In the development, there is a lot of no design form data submitted, such as login, registration and so on; but if the user clicks on the 'login' or 'registration', click the browser 'refresh button' refresh page, if not deal with this The same set of data will be repeated
to submit ...
In this, I will give you three solutions.
The idea is: when the user clicks the 'login' or 'registration' and other buttons, through the js script button state can not be clicked to the state, but the second method is not only against the gentleman, as long as the user attributes that day, Will be repeated .....
That is, after the form is submitted, redirects, jumps to a specified page, this time will not cause the user to refresh the page, causing the data to be submitted repeatedly ...duplicate content checker
The processing flow is as follows, by comparing
the token in the session and the value of the hidden token in the form, if the two are the same, then the same submission, if different is repeated.
The code is as follows: