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. Link to comment https://forums.phpfreaks.com/topic/236676-php-form-redirect-to-confirmation-page/ 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">'; ?> Link to comment https://forums.phpfreaks.com/topic/236676-php-form-redirect-to-confirmation-page/#findComment-1216671 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> Link to comment https://forums.phpfreaks.com/topic/236676-php-form-redirect-to-confirmation-page/#findComment-1216673 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 ... ? Link to comment https://forums.phpfreaks.com/topic/236676-php-form-redirect-to-confirmation-page/#findComment-1216741 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.