Ec (2); ajax authentication username 2 & lt ;? Phpheader (& quot; Content-type: texthtml; charsetgb2312 & quot;); require_once (incconnect. php); $ xmisset ($ _ GET [txt])? $ _ GET [txt]: null; if (preg_match (& quot; ^ [& quot;. ch script ec (2); script
Ajax authentication username 2
Header ("Content-type: text/html; charset = gb2312 ");
Require_once ('inc/connect. php ');
$ Xm = isset ($ _ GET ['txt '])? $ _ GET ['txt ']: 'null ';
If (preg_match ("/^ [". chr (0xa1). "-". chr (0xff). "] + $/", $ xm )){
Echo ("
Sorry, you cannot use Chinese as the user name!
");
Exit ();
}
If ($ xm = 'null' | $ xm = ''| strlen ($ xm)> 10 | strlen ($ xm) <3 ){
Echo ("
Sorry, the user is composed of 3-12aa_zz and numbers!
");
Exit ();
} Else {
$ Result = mysql_query ("select m_uid from wk_member where m_uid = '$ xm'") or die ('error! '. Mysql_error ());
If (! Mysql_num_rows ($ result )){
Echo ("
Congratulations! This user can register!
");
} Else {
Echo ("
Sorry, the user has been registered. Please select another name!
");
}
}
?>
Original Site: www.111cn.net