javascript - PHP How to solve the problem of repeated submission of form on refresh page??

WBOY
Release: 2023-03-01 17:30:01
Original
1172 people have browsed it

How does PHP solve the problem of repeated submission of forms when refreshing the page?? What needs to be done? ?

Reply content:

How does PHP solve the problem of repeated submission of forms when refreshing the page?? What needs to be done? ?

commit id

Add a hash to judge

Use session to generate a hash value when rendering the page, and then submit the hash value for comparison when submitting. If it is inconsistent, it will be submitted again.

checkToken

Just add version control. It is a very simple function. For example, many java frameworks provide it, and big php also has it, such as the yii2 framework

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!