Stop data inserting into a database twice

后端 未结 16 1350
再見小時候
再見小時候 2020-12-01 00:33

I was wondering what methods/preventions other programmers use to stop data being entered twice into a MySQL database when a user refreshes on the same page as a form? Obvio

16条回答
  •  时光取名叫无心
    2020-12-01 00:44

    The best way to avoid duplicate record insertion on page refresh is, after inserting records in the database on button click, just add this line:

    Response.Write("");
    

提交回复
热议问题