Forums

This topic is locked

Form redirect after submit

Posted 01 Sep 2004 09:30:49
1
has voted
01 Sep 2004 09:30:49 Mikhail R. posted:
Could someone please tell me what the code is (and where it goes) to redirect to a specific page (on submission of a form) instead of bringing up echo 'thank you.....' as in the following code.

<?
$name=$_POST['name'];
$email=$_POST['email'];
$address=$_POST['address'];
$city_state_zip=$_POST['city_state_zip'];
$phone=$_POST['phone'];
$notes=$_POST['notes'];
$to=" ";
$message="$name just filled in Reservations form. They are from:\n$address \n$city_state_zip \nPhone number: $phone \nMessage:\n$notes\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n") {
echo "Thank you for your information, \nwe will review it an contact you as soon as possible.";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>


--------------------------------------
If you don't ask the answer is always no.

Reply to this topic