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, Quote Link to comment 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! Quote Link to comment 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 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.