The following php script is in my public.html folder. 3 problems.
1. I do not recieve the information to my e-mail from the form
2. Once the form is filled in, it redirects me to the index.php page but not back to the main page.
3. By clicking the browsers back button, I can return to the main page but the form still has the filled information. It is not re-setting itself.
I AM USING THE FORM RIGHT ON THE MAIN(INDEX PAGE OF MY SITE). IT IS NOT ON A SEPERATE PAGE.
Can someone help me figure this out. Thanks
<HTML>
<HEAD>
<TITLE>Thank You for requesting an Interview</TITLE>
</HEAD>
<BODY>
<H2>Thank You for requesting an Interview</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "mchurchill@prosperityourway.com";
$mailsubj = "contact us 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>
1. I do not recieve the information to my e-mail from the form
2. Once the form is filled in, it redirects me to the index.php page but not back to the main page.
3. By clicking the browsers back button, I can return to the main page but the form still has the filled information. It is not re-setting itself.
I AM USING THE FORM RIGHT ON THE MAIN(INDEX PAGE OF MY SITE). IT IS NOT ON A SEPERATE PAGE.
Can someone help me figure this out. Thanks
<HTML>
<HEAD>
<TITLE>Thank You for requesting an Interview</TITLE>
</HEAD>
<BODY>
<H2>Thank You for requesting an Interview</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "mchurchill@prosperityourway.com";
$mailsubj = "contact us 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>
Comment