Back button re-submit form data ($_POST)

后端 未结 6 989
鱼传尺愫
鱼传尺愫 2020-11-27 19:23

My problem is that the back button causes the browser to say something like \"Page expired\" when the previous page was created by a form.

Example:

  • pag
6条回答
  •  长情又很酷
    2020-11-27 20:06

    You can use session to do this.

    eg.

    $_SESSION['name'] = $_POST['name'];

    Remember to unset your variables after the process is complete to optimize memory usage.

提交回复
热议问题