Php registration interface, tested using WampServer (64bit) 2.4

Source: Internet
Author: User
Php registration interface, use WampServer (64bit) 2.4 test ① my interface is clearly like this



What should I do when wamp becomes like this?



If (! Isset ($ _ POST ['submit ']) {exit ('illegal access! ') ;}$ Username =$ _ POST ['username']; $ password =$ _ POST ['password']; $ email =$ _ POST ['email']; // Determine if (! Preg_match ('/^ [\ w \ x80-\ xff] {3, 15} $/', $ username) {exit ('error: the user name does not comply with the rules. Return ');} if (strlen ($ password) <6) {exit (' error: Invalid password length. Return ');} if (! Preg_match ('/^ w + ([-+.] w +) * @ w + ([-.] w + )*. w + ([-.] w +) * $/', $ email) {exit (' error: Incorrect email format. Return ');}


// Include the database connection file include ('Conn. php '); // check whether the user name already exists $ check_query = mysql_query ("select uid from user where username =' $ username' limit 1 "); if (mysql_fetch_array ($ check_query) {echo 'Error: username', $ username, 'already exists. Return '; exit;} // write data $ password = MD5 ($ password); $ regdate = time (); $ SQL = "INSERT INTO user (username, password, email, regdate) VALUES ('$ username',' $ password', '$ email', $ regdate) "; if (mysql_query ($ SQL, $ conn )) {exit ('User registration successful! Click here to log on to ');} else {echo' Sorry! Failed to add data: ', mysql_error (),'
'; Echo' Click here to return retry ';}


② Where are the codes written on both ends above? How do I write code in MySql?



 
  User registration
 


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.