<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
include("../conn.php");
 ?>

<?php
if(strlen($_GET['username'])<6)
{
 ?>
<font color="#FF0000"><b>用户名长度至少为六位</b></font>
 <input type="hidden" name="userstatenow" id="userstatenow" value="no" />
<?php
}
else
{
$sql="select username from chat_user where username='".$_GET['username']."'";
mysql_query("set names 'utf8'",$dbconn);
$result=mysql_query($sql,$dbconn);
if(mysql_num_rows($result)>0)
{
	 ?>
    <font color="#FF0000"><b>用户存在</b></font>
     <input type="hidden" name="userstatenow" id="userstatenow" value="no" />
    <?php
}
else
{
	 ?>
    <font color="green"><b>可以注册该用户</b></font>
     <input type="hidden" name="userstatenow" id="userstatenow" value="ok" />
    <?php
}
}
 ?>