<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofllow">
<?php
include("inc/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{
   $str=explode('@',$_GET['username']);
       if(count($str)<2){
 	     ?>
        <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']."'";
          $result=mysql_query($sql);
         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
		}
    }
}
 ?>