Forums

This topic is locked

PHP form redirect

Posted 02 Sep 2004 06:19:28
1
has voted
02 Sep 2004 06:19:28 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.";
}
?>
<font color=red></font id=red><b></b><b></b><u></u><u></u><img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle><img src=../images/dmxzone/forum/icon_smile_question.gif border=0 align=middle>

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

Reply to this topic