ajax验证用户名二
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("
exit();
}
if($xm=='null' || $xm=='' || strlen($xm)>10 || strlen($xm) echo("
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("
}else{
echo("
}
}
?>
本站原创: www.111cn.net










