jfourman Posted August 23, 2006 Share Posted August 23, 2006 I am embarrased to ask this question because I know the answer is simple; but I have been looking for examples and can't find the solution.I have a form that upon 'submit' performs some PHP code to send confirmation emails. At the end of the PHP code, a "print" message is displayed on the same page acknowledging that the emails have been sent. Instead of displaying the message on the same page, I want to load a new page to display the confirmation message. I can't figure out what code to use to replace the "print" command with a command that will navigate to a new page instead. The navigation has to be automatic...no button press.I'm obviously a noobie that is very grateful for your help. Quote Link to comment Share on other sites More sharing options...
dank Posted August 23, 2006 Share Posted August 23, 2006 Everyone is a newbie at some point, so there is nothing to be embarassed about.You can use the following instead of print:[code] Header("Location: success.php");[/code] Quote Link to comment Share on other sites More sharing options...
jfourman Posted August 23, 2006 Author Share Posted August 23, 2006 Andrew:Thank you for your reply. The code I am hacking is from an "include" in an ecommerce app page named updateorder.php. My include is called updateorderform.php.I substituted the "print" command with the "header" command you suggested and was returned the error: Warning: Cannot modify header information - headers already sent by (output started at /home/store/www/dev/orderupdate.php:10) in /home/store/www/dev/orderupdateform.php on line 226I am trying to substitute the "print" at the end of the include code with navigation to a success.php page. I tried to change the "action" in my form to the success.php page; but although this appears to work, the confirmation emails after the "submit" fail to send. This all works with the "print" statement...but stays on the same page after sending the emails. I want to show a new page.Is there anything I can use other than the "Header" statement.Thank you again for your help. 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.