Jump to content

How do I display a confirmation page after form edits?


jfourman

Recommended Posts

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.
Link to comment
Share on other sites

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 226

I 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.



Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.