PDA

View Full Version : form help



sodicoserv
10-21-2007, 05:57 PM
Hello.

Iīm trying to do a form with all the steps that you show on the tutorial, but on the step of copy and pasting the code to change the mailto part (and the other part), well, I donīt see that code even if I scroll down.

What do you think this code does not appear ? Also, how can I make two forms whit a different "thank you" page ?

navaldesign
10-21-2007, 07:49 PM
The code is there, however i have copied it here fr you:

<?PHP
$mailto = "youremail@yourdomain.com";
$email = $HTTP_POST_VARS['email'];
if ($email == "") {
$email = $mailto;
}
$mailsubj = "Type your mail subject here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>

If you follow the tutorial, you will see that each form has its own action. So, simply make the thank you page for the first form, action1 and the one for the second form, action2.