08-25-2010, 02:52 AM
On all of my post and gets, you can just f5 and submit the data over and over, is there an easy way to avoid this?
How can I prevent this?
|
08-25-2010, 02:52 AM
On all of my post and gets, you can just f5 and submit the data over and over, is there an easy way to avoid this?
Use a cookie so it can detect if they've F5'd in the last 10 seconds, and if they have then use an if statement to stop the post/get.
10-06-2010, 01:55 PM
(08-25-2010, 04:12 AM)Starky Wrote: Use a cookie so it can detect if they've F5'd in the last 10 seconds, and if they have then use an if statement to stop the post/get.You need us to wipe your ass for you too? There was really no need to be rude about it. @OP: Alternatively, you can store what they POSTed (you should serialize() it) and the time in a mysql table, and if the same data was stored less than x seconds ago, don't process.
10-06-2010, 09:00 PM
(08-25-2010, 02:52 AM)`P R O D I G Y™ Wrote: On all of my post and gets, you can just f5 and submit the data over and over, is there an easy way to avoid this? You should be redirecting your users away from the form after it has been validated and executed. Doing so will mean that if your user decides to spam the refresh button they'll be doing so on a safe page. How it might look in pseudocode: Code: if form submitted then
11-26-2010, 02:33 PM
This is a problem for me too, if they click back, it repeats the GETs.
11-30-2010, 02:01 PM
(10-06-2010, 09:00 PM)Disease Wrote: You should be redirecting your users away from the form after it has been validated and executed. Doing so will mean that if your user decides to spam the refresh button they'll be doing so on a safe page. How it might look in pseudocode: Hey, that would work pretty nicely. But that would mean that each submissApproachion would require its own success page, and if done half-assed (like most of my scripts) it can get messy real quick |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
[Guide] Security: Prevent SQLi and XSS Attacks | Haxalot | 8 | 3,225 |
06-25-2015, 11:08 AM Last Post: ParagonInitiative |