ITeye博客

ajax

共 1 篇文章

ajax验证用户名

<?php 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("<div id='error'>对不起,不能使用中文作为用户名! </div>"); exit(); } if($xm=='null' || $xm=='' || strlen($xm)>10 || s…

2009-07-17 10:02 · ajax · HTML · Ajax · PHP · MySQL