Here's the link:
http://www.html4me.com/augustandsept...1/htmlform.php
And here's the PHP code for the form mail script:
<?php
if (($name != "") || ($email != "") || ($feedback != ""))
{
$send = "yes";
}
else
{
$send = "no";
}
$error_detection = 0;
if ($name == "")
{
$send = "no";
$error_detection = $error_detection + 1;
$name_err = "<font face='arial' size='2' color='red'><b>There were some errors in processing your
request/b><BR><BR>$error_detection /t Please fill in the <b>Name</b> field correctly.</font><BR><BR>";
}
else if ($email == "")
{
$send = "no";
$error_detection = $error_detection + 1;
$email_err = "<font face='arial' size='2' color='red'>$error_detection /t Please fill in the <b>Email</b> field
correctly.</font><BR><BR>";
}
else if ($feedback == "")
{
$send = "no";
$error_detection = $error_detection + 1;
$feedback_err = "<font face='arial' size='2' color='red'>$error_detection /t Please fill in the <b>Feedback</b> field
correctly.</font><BR>";
}
else if (send == "no")
{
echo "<HTML>";
echo "$email_err";
echo "$name_err";
echo "$feedback_err";
echo "</HTML>";
}
else if (send == "yes")
{
$feedback = StripSlashes($feedback); // hash out any special characters while script is running
$subject = "feedback from web site";
$mailcontent = "Customer name: ".$name."\n"
."Customer email: ".$email."\n"
."Customer comments: \n".$feedback."\n";
$fromaddress = "info@html4me.com";
mail($toaddress, $subject, $mailcontent, $fromcontent);
echo "<HTML><head><title>Feedback sent!</title></head>";
echo "<BODY><font face='arial' size='2'><h1><center>Feedback Sent!</center></h1></font><BR><BR>";
echo "<font size='2' face='arial'>Your feedback/font><BR>";
echo "<font face='arial' size='2'>";
echo "$feedback";
echo "</font>";
echo "<BR>";
echo "<font size='2' face='arial'>Thank you!</font></BODY></HTML>";
}
?>
Why doesn't this simple Form mail work?!?! I don't get it. No error messages are produced - I just get a blank screen each time.
Thanks!
Gregory C.
Email: >> host@html4me.com



/b><BR><BR>$error_detection /t Please fill in the <b>Name</b> field correctly.</font><BR><BR>";



Bookmarks