jawinn Posted October 3, 2006 Share Posted October 3, 2006 I want to be able to change the header of a page in order to redirect users to a thankyou.php page. Here's my setup. I have index.php that has a form on it. The form uses a processor called answer.php. The processor sends the form's data to a database. I used to just have the form data emailed to me and the users were successfully redirected to the thankyou.php page. I want to be able to have the form data sent to the DB AND redirect the visitors to the thank you page. Is there anything different I need to do with my original headers to make this happen. If I need to post the code just let me know.thanks in advance, Link to comment https://forums.phpfreaks.com/topic/22884-help-changing-header/ Share on other sites More sharing options...
printf Posted October 3, 2006 Share Posted October 3, 2006 When your done doing your processing and there are no errors, just use..[code]header ( 'Location: /some_page.php' );exit ();[/code]But remember you can not output anything before doing ths!me! Link to comment https://forums.phpfreaks.com/topic/22884-help-changing-header/#findComment-103149 Share on other sites More sharing options...
jawinn Posted October 3, 2006 Author Share Posted October 3, 2006 That did it! Thanks a bunch.J Link to comment https://forums.phpfreaks.com/topic/22884-help-changing-header/#findComment-103204 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.