How to implement from the HTML post to a PHP file data in the PHP file verification data, if the data error in the HTML pop-up prompts to re-enter?
For example, a new site user registration, if the user name exists then how to check the pop-up prompt dialog box? Or if the login password input is wrong, how to check the error after the prompt? Ask again which of the PHP tags and script tags can be nested inside? I thought of a way to implement it, but I needed PHP to be combined with JavaScript, but I didn't know how to nest it.
------Solution--------------------
Lou Zhu or read the "PHP and MySQL Web development" system to learn a bit first.
------Solution--------------------
Example
A.
User Input Registration Name
Triggers when the mouse focus has been entered and left input, or otherwise triggered, depending on how you want it to be
Triggering an AJAX event
B.
Ajax passes the user name to the server in the form of Get or post.
For example? username=test
Server checkname.php
C. Server checkname.php detects if the user name is duplicated and returns the result to Ajax
D.ajax output processing based on the information returned (the jquery popup div pops up).
This is what the process looks like, and you can look at jquery and deal with the encapsulated code.
------Solution--------------------
Newnew process all said ~ specific code or you to write
----
For example, a new site user registration, if the user name exists then how to check the pop-up prompt dialog box?
This requires an AJAX commit check.
----
Or if the login password input is wrong, how to check the error after the prompt?
This also requires an AJAX submission check.
----
Ask again which of the PHP tags and script tags can be nested inside?
I thought of a way to implement it, but I needed PHP to be combined with JavaScript, but I didn't know how to nest it.
PHP tags are not set in the JS code block you can print, echo output.
JS code block can be nested PHP code.
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.