Re: How do I add an e-mail page on my web site
Also- the encode type should be "multipart/form-data"
The reason is that your e-mail field on the form is named mail- the php script is looking for email to put in as the mailhead.
Andy
<?PHP
$email = $HTTP_POST_VARS[email];//change to mail
$mailto = "*************.com";
$mailsubj = "Testing 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);
?>
$email = $HTTP_POST_VARS[email];//change to mail
$mailto = "*************.com";
$mailsubj = "Testing 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);
?>
The reason is that your e-mail field on the form is named mail- the php script is looking for email to put in as the mailhead.
Andy
Comment