Prevent Duplicate Data In Reload Page After Submit Form
Possible Duplicate: How to prevent duplicate posts via a browser refresh? I have a simple html form to give some info from users and register it two database. all things are OK.
Solution 1:
A common solution is for the server-side script that handles the POST to redirect to itself - the browser will then use a GET request to fetch the page, which can be reloaded safely. Optionally, you can copy the POSTdata to SESSIONdata and refer to it to provide feedback such as "Message sent" or "Order submitted" or "Settings saved".
Solution 2:
Look up POST/REDIRECT/GET. That's the name of the design pattern that solves this.
Post a Comment for "Prevent Duplicate Data In Reload Page After Submit Form"