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