denoteone Posted October 21, 2008 Share Posted October 21, 2008 so far I have this in my mail.php file $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['message']; $message = 'The following email came in from '.$name.'<br><br> '.$comments.''; $subject = "Mail From Head Nods"; $headers = 'From: '.$email.'\r\n'; $headers .= "Reply-To:*******@gmail.com\r\n"; $headers .= "Content-type: text/html\r\n"; mail('*******@gmail.com',$subject,$message,$headers); now after the mail is sent I want the user to be sent to thankyou.html Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted October 21, 2008 Share Posted October 21, 2008 add header('Location:thankyou.html'); that was easy enough.. you may need to include the url in front of thankyou.html, I don't recall. Quote Link to comment Share on other sites More sharing options...
n3ightjay Posted October 22, 2008 Share Posted October 22, 2008 A little more if(mail('*******@gmail.com',$subject,$message,$headers)){ header('Location: /thankyou.php'); }else{ header('Location: /error.php'); } Just checks to make sure there wasn't an error sending the mail and having the user get hung up on an error page Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.