Php learning path 5 (form verification)

Source: Internet
Author: User
Tags ereg
Php (form verification) & lt; html & gt; & lt; head & gt; & lt; title & gt; PHP processing Form & lt; /title & gt; & lt;/head & gt; & lt; body & gt; & lt; h2 & gt; enter your personal information & lt;/h2 & gt; & lt; step 5 of fo php learning (form verification)
PHP processing formEnter personal information

Verification page:

 

 ";} Else if (strlen ($ name) <3 | strlen ($ name)> 10) {echo" name must be in the range of 3 to 10!
";} Else {echo" name: ". $ name ."
";}// Password verification if (empty ($ password) {echo" password cannot be blank
";} Else if (strlen ($ password) <3 | strlen ($ password)> 10) {echo" the password length must be between 3 and 10!
";} Else if (! Ereg ("[0-9a-zA-Z] +", $ password) {echo "the password must be a combination of numbers and characters!
";} Else {echo" password: ". $ password ."
";}// Verify the email address if (empty ($ email) {echo" the email address cannot be blank !!! ";} Else if (! Ereg ("^ [a-zA-Z0-9 _.] + @ ([a-zA-Z0-9 _] + .) + [a-zA-Z] {2, 3} $ ", $ email) {echo" incorrect email address format !!! ";} Else {echo" email address: ". $ email ."
";}?> Return


 

 


 

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.