Question : redirect on form submit

Can you help me adjust this script so that instead of printing "Yay! Thank you for contacting us..." it redirects to a page called "whatever.com"?
Attachments:
 
 

Answer : redirect on form submit

http_redirect is part of an extension so it may not be installed.

You could instead use:

header('Location: whatever.php');

but you need to make sure this is called BEFORE ANY OUTPUT at all. Edit the last part of the page to the following and you should be good to go.





1:
2:
3:
4:
5:
6:
7:
8:
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);  
header('Location: whatever.php');
}
?>
Random Solutions  
 
programming4us programming4us