Unset post variables after form submission

前端 未结 10 1173
礼貌的吻别
礼貌的吻别 2020-12-10 14:19

Is there a way to do the above? Basically, I don\'t want the form to be submitted again if someone presses refresh after already submitting the form once. In which case the

10条回答
  •  情深已故
    2020-12-10 14:51

    Use an intermediate page to do the operations and then redirect.

    For example:

    mypage.php --> the page with the form

    dostuff.php --> receives the form data and makes operations, then redirects to any other page.

    To do a redirect:
    Put this line on the top of "dostuff.php": header("Location: mypage.php");

提交回复
热议问题