How do I make my php contact form redirect the user to a thank you page after sending the email.
?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['fname'] ;
$message = $_REQUEST['message'];
mail("info@website.com", "$subject",
$message, "From:" . $email);
echo "<a href='http://www.website.com'>Thank you for your email, we will get back to you in the next 24 hours, click to go to the Home page</a>";
}
?>
the html
<form id="contact" action="email.php" method="post">
<div class="form_settings">
<p><span>Name</span><input class="contact" type="text" id="fname" name="fname"/></p>
<p><span>Email Address</span><input class="contact" type="text" id="email" name="email"/></p>
<p><span>Message</span><textarea class="contact textarea" rows="5" cols="50" id="message" name="message"></textarea></p>
<p style="padding-top: 15px"><span> </span><input class="submit" type="submit" name="contact_submitted" value="send" /></p>
</div>
</form>