PHP verification of user registration information is legal _ PHP Tutorial

Source: Internet
Author: User
PHP verifies that the user registration information is valid. When key functions use JavaScript to verify the validity of user registration information, it is often necessary to test the numeric data. JavaScript can use the isNaN () function to implement the above functions. Key functions

When verifying the validity of user registration information through JavaScript, it is often necessary to test the numeric data.

JavaScript can use the isNaN () function to implement the above functions. The following describes the function.

IsNaN () function

It is used to determine whether the parameter of this function is numeric data. If yes, False is returned; otherwise, True is returned.

Syntax

Bool isNaN (var)

The var parameter is the data to be judged.

Function implementation

After the user fills in the registration information, in order to ensure the validity of the information, it should also be verified. Verify the validity of registration information by using PHP code or JavaScript. Developers can select based on the actual situation. if you are worried about restrictions on JavaScript in the client browser, you can use PHP code, however, using this method to verify registration information is performed on the server, which wastes a lot of server resources. The application of JavaScript scripts to verify the user registration information is implemented by the client browser, which will greatly save server resources. This site verifies user registration information through JavaScript. When writing the user registration information verification module, the code that implements user registration information verification is encapsulated into the custom function chkinput login, the function is called in the onSubmit event marked in form. the code of the Chkinput login () function is as follows.

The following are

The following are Include_once ("top. php ");
?>








Include_once ("left. php ");
?>
 








 


Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.