View Full Version : need help with my form

05-10-2006, 09:39 PM
Ive created a form using php by following this tutorial (http://www.dreamweaverclub.com/dreamweaver-php-form.php) but when I click the submit button it redirects fine but i never recieve an email.

Everything seems to be working but I just dont recieve anything.

Cany anyone help?

This is what ive got.....

//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject = 'Question For Grant';

// Your email address. This is where the form information will be sent.
$emailadd = 'wassell9@hotmail.com';

// Where to redirect after form is processed.
$url = 'biography.html';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '1';

// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
foreach ($_POST as $key => $value)
if ($req == '1')
if ($value == '')
{echo "$key is empty";die;}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

Creative Insanity
05-11-2006, 04:16 AM
This has to be sent from a server with a mail server installed.. use a hoster if you have one.

This one is for Linux servers send mail option.

05-11-2006, 08:18 AM
How do I do that?

05-11-2006, 01:22 PM
find a host that supports PHP and all its toys

then get ya wallet out and pay for a years hosting

then upload your script and bobs your aunties uncle... your on ya way to email city

05-13-2006, 07:45 AM
Cheers fella. Just found out that my host doesnt support cgi's and PHP scripts, great hosts they are.

05-13-2006, 12:52 PM
Cheers fella. Just found out that my host doesnt support cgi's and PHP scripts, great hosts they are.

Many web hosting companies support PHP, and sometimes CGI, even in their least expensive packages. Find another hosting company.

05-16-2006, 12:09 PM
Ive just uploaded my site to a new host which supports cgi's and php scripts but I still dont recieve anything in my email account.


05-16-2006, 10:01 PM

05-17-2006, 08:29 PM
can anyone help me with this?

05-20-2006, 10:34 AM
For the last time, can anyone help me with my problem?