PHP HTML No refresh submission form, phphtml submit form
Typically, we use AJAX to submit a form without a flush. A while ago, I followed the boss. Another way to submit a form without flushing is to use the IFRAME framework. Now let's sort it out
Pre-used JS form to prevent duplicate submission method
The code is as follows
Copy Code
The following three methods are called separately
so if I make a form directly, and then submit it to/test, the above
Describe the situation first. I have to submit a job seven days later. I only need to use PHP and js. I am working on a login interface, that is, after information is submitted, I don't want to refresh the page, I want to transition to new content
Normally, after a form is submitted, if the user refreshes the page and submits the form repeatedly, in some cases we do not want the form to be repeated, and the 307 Status Code redirect page in the HTTP protocol can do this. Examples are as
Three ways to get post data from PHP
PHP image plus watermark source code
One of the simplest examples of Php+ajax+json
PHP Chinese Pinyin Source code
PHP iterates through directories, generates MD5 values for each file in the directory, and writes
: This article mainly introduces php programming notes. if you are interested in PHP tutorials, please refer to them. Three methods for php to obtain POST data
Php image watermarking source code
Php + ajax + json is the simplest example.
Php Chinese
Php programming notes-three methods for obtaining POST data from small_123 php
Php image watermarking source code
Php + ajax + json is the simplest example.
Php Chinese character to pinyin source code
Php traverses the Directory, generates the md5
Have seen a lot of various prevention forms repeatedly submitted JS or jquery program, but this is just a simple method, if we do not submit a form from this page, directly find the page to accept the data this JS processing method is invalid, below
Php method to prevent malicious page refresh
In general, malicious refresh is constantly to refresh the submission page, resulting in a large number of invalid data, below we summarize the PHP prevent malicious Refresh page Method
Read a piece of code first (php example)
1, Form code (form.php):
2, Action Code (formaction.php):
OK, the above code is very simple, but implementation of the form Submit no refresh .... What is this for?
Oh ~ actually
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.