douyijin7741 2017-01-04 10:34
浏览 75

在表单中使用POST方法后,F5 /刷新按钮和前进按钮问题

I read the answer here Simple Post-Redirect-Get code example, in my code, this works only when I clicked/pressed the back button. This is the process of the code

  1. POST
  2. Validates and if passed insert the data to database
  3. Redirect them to the same page Redirect::in($_SERVER['REQUEST_URI']) //I applied the accepted answer on the link here.

Problems are:

  • F5/refresh = confirm submit form is appearing.
  • Forward button = Document expired.

How can I solve this problem? I am aware/search of PRG pattern but failed to fully understand it and tried the accepted answer on the link but I still have some problem.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 chaquopy python 安卓
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 有没有帮写代码做实验仿真的
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥30 vmware exsi重置后登不上
    • ¥15 易盾点选的cb参数怎么解啊
    • ¥15 MATLAB运行显示错误,如何解决?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容
    • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题