Codeigniter - prevent double submit
1 answer
No, CI 3 does not handle double form submissions. What you need to do is submit your page and redirect to another after successful submission.
Now let's say your user clicks two or three times because maybe his mouse isn't working correctly, or his connection is too slow ... then you can also put the code in the form and if the form is submitted then save this code with its timestamp and prevent future submission for that code.
Periodically using cron you can delete saved form codes that are older than 1 minute.
Hope it helps.
0
source to share