How do I stop the Back and Refresh buttons from resubmitting my form?

后端 未结 13 1270
时光说笑
时光说笑 2020-11-27 15:16

I am doing web development.

I have a page to do with credit card, which when user click \"refresh\" or \"Back\", the transaction will be performed one more time, wh

13条回答
  •  余生分开走
    2020-11-27 15:45

    1. generate a random string and store it in session,

    2. then output it to your form as a hidden value,

    3. check the submitted and store variable, if matches process your request,

    4. go to 1.

提交回复
热议问题