» » submit

 
Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

Use PHP to prevent duplicate submiting form

Author: bamboo06 on 23-06-2016, 00:26, views: 3477

5 We submit the form, a limit can not be ignored is to prevent users who repeatedly submit the form, because there may be a user continuously hits the submit button or a malicious attacker to submit the data, then we submit the data after processing, such as modifying or adding data to the database when they will get into trouble.
Use PHP to prevent duplicate submiting form

So how do you avoid duplicate submission form this phenomenon happen? We can see from many aspects, first from the front end to make restrictions. In the front-end javascript is disabled after a button is clicked, the disabled, this simple method of preventing multiple clicks the submit button, but the disadvantage is that if the user has disabled javascript script is invalid. Second, we can do after submitting the redirect page redirection, that is submitted after the jump to a new page, the main F5 avoid duplicate submissions, but there are drawbacks. Thirdly, it is made unique database index constraint. Fourth, it is to do the session token authentication.

Category: PHP Scripts