I need a guidance / suggestion about how to prevent the DOUBLE DATA SUBMISSION to database.
This usually occurs when after the submit, user hit REFRESH button, or hit the Go Back button.
In short, the DATA INSERTION script is refreshed and submit the data again.
Here is my idea.
Have a code may be md5(time()+session_id) in a hidden field of the form. And upon insertion, first do a check if that code is already there in the database, if the answer is NO, INSERT that, else show a message !
What do you people think, is this idea OK, or there can be some better ways ?