View Single Post
  #1  
Old 09-19-2005, 03:54 AM
Patti Johnson's Avatar
Patti Johnson Patti Johnson is offline
Sergeant Major
 
Join Date: Jul 2005
Posts: 95
Question HTML code for Contact Form

If one of you great html people out there can help me with this, I'll be very happy. Here's my form www.winetastingatyourhome.com/contact.html and the following is the code on my contact.php file on the server. Obviously the code does not include all aspects of the form, so when I receive an email, it does not include all the fields that are on the form itself. Can someone help me with changing this code so that the form will relay all info correctly? The submit button works fine.

<HTML>
<HEAD>
<TITLE>Thank you.</TITLE>
</HEAD>
<BODY>
<H2>Thank you. We will contact you shortly.</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "contact@winetastingatyourhome.com";
$mailsubj = "contact form";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);

$mailbody = "Values submitted from web site form:\n";

while (list ($key, $val) = each ($HTTP_POST_VARS))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HEAD>
Reply With Quote