PHP Verifying user registration information is legitimate _php tutorial

Source: Internet
Author: User
key Functions

When validating the legality of user registration information through JavaScript, it is often necessary to test the numerical data.

JavaScript can use the isNaN () function to implement the above functions, which are explained below.

IsNaN () function

Used to determine whether the parameter of the function is numeric, returns false, or true.

Grammar

BOOL IsNaN (VAR)

The parameter var is the data to be judged.

function implementation

When the user fills out the registration information, the information should be verified in order to ensure the legality of the information. Verification of the legality of registration information can be implemented either by applying PHP code or by applying JavaScript. Developers can choose according to the actual situation, if you are concerned that the client browser restrictions on JavaScript, it can be implemented in PHP code, but using this method to verify the registration information is done on the server, so a lot of wasted server resources. The application of JavaScript script to verify the user's registration information is implemented by the client browser, so it will save the server resources to a great extent. The verification of user registration information is implemented by JavaScript. When writing the user registration information validation module, the code that implements the user registration information validation is encapsulated in the Custom function Chkinput login () and called in the OnSubmit event of the form tag, chkinput the code for the login () function is as follows.

Below are

The following is include_once ("top.php");
?>








Include_once ("left.php");
?>











Related Article

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.