stop inserting data in the database when refreshing the page

后端 未结 10 1287
太阳男子
太阳男子 2020-12-06 02:27

I am looking for a way to stop inserting or sending data in the database when refreshing the page.

here is my code:

user_details_page.php

<         


        
10条回答
  •  死守一世寂寞
    2020-12-06 03:02

    Once an insert or update is done in your code you always need to redirect to another page.

    See here on how to do that: How to make a redirect in PHP?

    (You want to use a PHP redirect, not a Javascript or HTML one, because you obviously really need this to work.)

    The confirm page should be what you redirect to after the update, not what does the insert.

提交回复
热议问题