View Single Post
  #3  
Old 09-09-2005, 02:32 AM
Patti Johnson's Avatar
Patti Johnson Patti Johnson is offline
Sergeant Major
 
Join Date: Jul 2005
Posts: 95
Post

Thanks Pablo... I used the code you supplied... I don't believe that I changed anything other than the email section, and added an email textbox to my form (although the email field apparently isn't mandatory in order for someone to submit) and now it's working. Can you tell me how to get the reader back to my site after the window comes up saying "thank you for your feedback"? Is it possible to put in a "return" button possibly?

Thanks as usual,
Patti

Quote:
Originally Posted by Pablo
2 Problems:

1. There's no email field in the form. This code requires an editbox with the name 'email'.

2. The PHP code is not correct, why did you change it?
Here's my orginal code:
<HTML>
<HEAD>
<TITLE>Thank you for your feedback</TITLE>
</HEAD>
<BODY>
<H2>Thank you for your feedback!</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "yourname@yourdomain.com";
$mailsubj = "Feedback 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