ben37d Posted May 17, 2011 Share Posted May 17, 2011 I am fairly new to PHP and am having an issue with getting my form to redirect to a thank you page upon sending the form email. I currently have it set to echo a thank you message but it needs to be changed to ensure that we can track all form fills better. I have tried the header method but it doesn't work correctly based on how the website is designed. It seems like there should be an easy way without redesigning too much. Are there any other ways to accomplish this? Please let me know what I need to do in order to get the redirect to work. Quote Link to comment Share on other sites More sharing options...
zer0day Posted May 17, 2011 Share Posted May 17, 2011 <?php echo '<META HTTP-EQUIV="Refresh" Content="0; URL=index.php">'; ?> Quote Link to comment Share on other sites More sharing options...
BrendanMullan Posted May 17, 2011 Share Posted May 17, 2011 <script type="text/javascript"> window.location = "thankyou.php"; </script> Quote Link to comment Share on other sites More sharing options...
The Letter E Posted May 17, 2011 Share Posted May 17, 2011 I am fairly new to PHP and am having an issue with getting my form to redirect to a thank you page upon sending the form email. I currently have it set to echo a thank you message but it needs to be changed to ensure that we can track all form fills better. I have tried the header method but it doesn't work correctly based on how the website is designed. It seems like there should be an easy way without redesigning too much. Are there any other ways to accomplish this? Please let me know what I need to do in order to get the redirect to work. What is wrong with using header?? Is it giving you an output like: headers already sent on line ... ? 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.