Is there any built-in method in cakephp to prevent repeated form submission? for example, if I do a user registration function, click submit to the information confirmation page, click submit, and enter the database. (information validation is not performed when receiving the database, for example: check whether the user name already exists ). & Nbsp; after I enter the database, click the back button of the browser to return to the information confirmation page. at this time, I click Submit. because no verification is performed, the user's information will be rechecked into the database. & nbsp; I just want to see if there is any built-in method in cakephp to prevent repeated form submission.
For example, if I create a user registration function, click submit to the information confirmation page, click submit, and enter the database (information validation is not performed when the database is in place, for example, whether the user name already exists, check the information on the information confirmation page ).
After I enter the database, click the back button of the browser to return to the information confirmation page. at this time, I click Submit. because no verification is performed, the user's information will be rechecked.
I just want to ask cakephp built-in methods. I know about these methods like token verification.
It's not long before you get started with cake.
------ Solution --------------------
Look at http://www.ibm.com/developerworks/cn/opensource/os-php-cake3/
Here we are talking about
Introduction to cache
Although the use of requireAuth protection has obvious advantages, there are also some shortcomings to be overcome. Most of the disadvantages are Cache problems ".
Each time a form is evaluated by requireAuth, a verification key is generated. This means that if a user submits a form containing a used key, the form submission operation will be considered invalid. This problem may occur in several situations, including (but not limited to) using multiple browser windows, using the Back button to return to the previous page, browser cache, proxy server cache, and so on. You may think of these problems as user errors, so ignore them. you should resist the temptation and begin to process invalid form submissions.
If you use security, when submitting a form, cakephp will automatically verify the token and session in the form, you can unset the token value in the session after receiving the database. no matter how the user returns to the confirmation page, cakephp will check the submission and roll back if the check fails. you can write a rollback method by yourself to prompt.
If you understand the core code, you will understand this process.