Hey I wonder if anyone can help me.
I have a form that inserts a bunch of entries into a database. When the data is submitted it gives a message saying thank you and that the data was entered. I am also trying to user proof my code.
The problem is if a user clicks 'Back' in their browser and clicks submit again the same data is entered again. I want to prevent that situation from happening.
What is the best way to prevent this from happening. My initial thought was to log their IP and then code it such that they can then not insert anything into the database for a predetermined amount of time say 10 minutes. This way however could conceivable cause a problem if a lot of users accessed the site through a NAT router on the same LAN in that they would all have the same public IP.
Is there a simpler or more preferred method to prevent duplicates.
Thanks.