Jump to content


Photo

Help Changing Header


  • Please log in to reply
2 replies to this topic

#1 jawinn

jawinn
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 03 October 2006 - 04:10 PM

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,


#2 printf

printf
  • Staff Alumni
  • Advanced Member
  • 889 posts

Posted 03 October 2006 - 04:20 PM

When your done doing your processing and there are no errors, just use..


header ( 'Location: /some_page.php' );
exit ();


But remember you can not output anything before doing ths!


me!

#3 jawinn

jawinn
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 03 October 2006 - 05:21 PM

That did it!  Thanks a bunch.

J




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users