Jump to content

Bouble Submision Issues


phpretard

Recommended Posts

I have a form that when is completed submits the info into a DB.  No problem

 

When the form is complete the header redirects you to a new page.  If you click the back button you of course get this page has expired but if you click yes to refresh it resubmits the same infor to the DB.  Now I have Duplicate entries with the basically the same info.

 

How could I prevent this issue?

Link to comment
https://forums.phpfreaks.com/topic/107572-bouble-submision-issues/
Share on other sites

Use the following pattern:

 

form -> submission page -> page to be forwarded to

 

Have all the processing done on the submission page, with a redirect to the page to be forwarded to at the end. Since all the processing is done on the submission page behind the scenes on the server, the user's history will only show the form page, and the page to be forwarded to. This way when the user clicks back, they go back to the form, and nothign is submitted.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.