When registration form submits using POST method and when you refresh the same page then it will prompt for resubmit or resend information. How we can prevent this?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Is there a way to play audio on a mobile browser w
You can use ajax. You keep the same php code that you put in another file, and you post the data via ajax.
You can use include a one-time random token in the form. The first time that token is submitted (with other data), an action is taken. Future submissions of the same token have no effect (or just show the same confirmation page), and submissions with blank or invalid tokens are rejected.
This also protects against cross-site request forgery.
Try this:
I placed it into prevent_resend.php and then included it after the postdata processing was done.
Use post-redirect-get. In short: