There are many simple methods to prevent repeated data insertion from refreshing webpages. let's provide several reference solutions. How to prevent data insertion from refreshing webpages: I made a message board, but information is inserted every time I refresh the page. what can I do to prevent data refresh and insertion... there are many simple methods to prevent repeated data insertion from refreshing webpages. let's provide several reference solutions.
How to prevent data insertion from refreshing webpages:
I made a message board, but information will be inserted every time I refresh it. what can I do to prevent refreshing and inserting data?
JS returns after each operation
You can generate a cookie on the published page. on the submitted page, if the cookie is successfully submitted, the cookie is cleared. you can determine whether the cookie exists during the refreshing process.
Another way is to directly judge the database after querying it,
If ($ regs) {die ('Is exisit');} else {mysql _.....}
Address:
Reprinted at will, but please attach the article address :-)