Forum Moderators: coopster

Message Too Old, No Replies

Preventing back button press and resubmitting

         

kkonline

6:49 am on Aug 22, 2007 (gmt 0)

10+ Year Member



Hi i am making a form which has name and code (captcha image) as fields to be entered. I have given a timeout of x so if the form is submitted after x secs then it will print timeout and also used a token verification..

The problem

If the user submits a data then processing is fine. But when he presses the back button of browser and submit again then the captcha image remains same. [but changes when the form is refreshed] So the user in this case submits the form presses back and then submits the form and floods my database with same data again and again. Is there a way so that when user presses back button then the captcha image refreshes. Or some other simple solution?

jatar_k

12:23 pm on Aug 22, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could try adding

<meta http-equiv="pragma" content="no-cache">

though pages may still be cached