Prevent form from being submitted twice

后端 未结 4 1651
孤城傲影
孤城傲影 2020-12-10 06:23

I have a simple php form, like this:

the problem is that if

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-10 06:46

    You should perform a REDIRECT to a page with a message that the data was inserted... and a back button to go to the form again (if you want to)...

    To redirect using PHP use the header function:

    header('Location: http://www.example.com/');
    

提交回复
热议问题