第一是:zcyh.php(注冊(cè)用戶名)<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
<tr>
<td><font color="#ff0000">當(dāng)前位置:<a href=&quo " /> 激情丁香小说,在线观看黄色大片,成人h在线观看

一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

用戶的詳細(xì)注冊(cè)和判斷

有三個(gè)文件:
第一是:zcyh.php(注冊(cè)用戶名)<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
    <tr>  
      <td><font color="#ff0000">當(dāng)前位置:<a href="index.php">主頁(yè)</a>>>注冊(cè)頁(yè)面</font></td>
    </tr>
  </table><br>

  <table width="82%" border="0" height="27">
    <tr>  
      <td height="14"><b><font color="#660099"><img src="images/dyb.gif" width="68" height="22">  
        請(qǐng)?jiān)O(shè)定用戶名:(<font color="#FF0000">3-15位</font>)</font></b></td>
    </tr>
  </table>
  <form name="form1" method="post" action="register.php">
    <table width="80%" border="0" height="154">
      <tr>  
        <td width="42%">  
          <div align="right"><font color="#0000FF">用戶名:</font>
        </td>
        <td width="58%">  
          <input type="text" name="name" maxlength="20">
        </td></div>
      </tr>
      <tr>  
        <td colspan="2" height="27">  
          <div align="left"><font size="2"><font color="#FF0000">注意:</font><font color="#0000FF">用戶名只能由英文字母(a-z),數(shù)字(0-9)和下劃線('_'、'-'、'.'  
            )構(gòu)成,不能有空格,且必須以英文字母為開(kāi)頭。 </font></font> </div>
        </td>
      </tr>
      <tr>  
        <td colspan="2" height="14">  
          <div align="left"><font size="2"><font color="#FF0000">例如:</font></font></div>
        </td>
      </tr>
      <tr>  
        <td colspan="2">  
          <div align="center"><font size="2" color="#FF0000"><b><font color="#0000FF">√</font></b>正確的例子:jocky、lin_xing、nh2001</font></div>
        </td>
      </tr>
      <tr>  
        <td colspan="2">  
          <div align="center"><font size="2" color="#FF0000"><b><font color="#0000FF">×</font></b>錯(cuò)誤的例子:li  
            kitty、ming:)、168kk</font></div>
        </td>
      </tr>
      <tr>  
        <td colspan="2" height="18">  
          <div align="center"><font size="2" color="#0000FF">如果你已經(jīng)填寫好,請(qǐng)點(diǎn)“</font><font size="2"><font color="#FF0000">下一步</font><font color="#0000FF">”按鈕;  
            點(diǎn)“</font><font color="#FF0000">取消</font><font color="#0000FF">”按鈕即取消您剛才的輸入,重新開(kāi)始。</font>  
            </font></div>
        </td>
      </tr>
      <tr>  
        <td colspan="2" height="19">  
          <div align="center">  

            <input type=image name=name2 src="images/xyb.gif" width="68" height="22" border="0">
           <input type=hidden name=name3 value=<?echo$name?>>
             <a href="zcyh.php"><img src="images/cancel.gif" width="68" height="22" border="0"></a></div>
        </td>
      </tr>
    </table>
  </form>
<br>

</div>
<br>
<?include("foot.inc.php")?>
</body>
</html>
第二個(gè)是:register.php(判斷注冊(cè)用戶名是否正確和是否重復(fù),然后輸出注冊(cè)的詳細(xì)表單)
<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
    <tr>  
      <td><font color="#ff0000">當(dāng)前位置:<a href="index.php">主頁(yè)</a>>><a href=zcyh.php>注冊(cè)頁(yè)面</a>>>詳細(xì)資料</font></td>
    </tr>
  </table><br>
<?
if($name==""){
    echo"<br><center><font color=blue>用戶名不能為空。請(qǐng)</font><a href=zcyh.php>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if(strlen($name)<3 || strlen($name)>15){
    echo"<br><center><font color=blue>用戶名的長(zhǎng)度不符合要求。請(qǐng)</font><a href=zcyh.php>返回</a></center><br>";
  include("foot.inc.php");
    exit();
}
if (!eregi("^[_a-z0-9-]+(/.[_a-z0-9-]+)*$", $name)) {
       echo"<br><center><font color=blue>注冊(cè)名只能由字母數(shù)字組成.請(qǐng)</font><a href=zcyh.php>返回</a></center><br>";
      include("foot.inc.php");
    exit();
    }
if ($name)
    {     
        $conn=@mysql_connect("localhost");
        $sql=@mysql_select_db("jocky",$conn);
        $result=@mysql_query("select * from user1 where name='$name'" ,$conn);
        if($result){
             if(@mysql_fetch_object($result)){
                 echo"<br><center><font color=blue>對(duì)不起,已經(jīng)有相同的用戶名!請(qǐng)</font><a href=zcyh.php>返回</a>.</center><br>";}
                 else{$conn=@mysql_connect("localhost");
                      $sql=@mysql_select_db("jocky",$conn);
                      $sqldo="insert into user1 (name) values ('$name')";
                     @mysql_query($sqldo,$conn);
                 echo"<br><center><font color=blue>你好,</font>";
                 echo"<font color=red><b>$name</b></font></center>";
                 include("zhuce.php");
                 @mysql_close($conn);}
                include("foot.inc.php");
                 exit();
             }
        }
    ?>
    </div>
<?include("foot.inc.php")?>
</body>
</html>
第三個(gè)是:check.php(判斷注冊(cè)資料是否正確,然后插入數(shù)據(jù)庫(kù),重新登錄)
<?include("header1.inc.php")?>
<div align=center>  
<table width="89%" border="0">
    <tr>  
      <td><font color="#ff0000">當(dāng)前位置:<a href="index.php">主頁(yè)</a>>><a href=zcyh.php>注冊(cè)頁(yè)面</a>>>詳細(xì)資料</font></td>
    </tr>
  </table><br>
<?
if($truename==""){
    echo"<br><center><font color=blue>真實(shí)姓名不能為空。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if($password==""||$repassword==""){
    echo"<br><center><font color=blue>密碼不能為空。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if($repassword!=$password){
    echo"<br><center><font color=blue>兩次輸入的密碼不一樣。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if(strlen($password)<6 || strlen($password)>15){
    echo"<br><center><font color=blue>密碼的長(zhǎng)度不符合要求。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
  include("foot.inc.php");
    exit();
}
if($pwwhat==""){
    echo"<br><center><font color=blue>密碼提示問(wèn)題不能為空。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if($pwan==""){
    echo"<br><center><font color=blue>密碼提示答案不能為空。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if($personalid==""){
    echo"<br><center><font color=blue>身份證號(hào)碼不能為空。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if(strlen($personalid)!=15 or strlen($personalid)!=18){
    echo"<br><center><font color=blue>輸入的身份證號(hào)碼不是15位或18位。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
  include("foot.inc.php");
    exit();
}*/
if($year=="" || $month=="" || $day==""){
    echo"<br><center><font color=blue>出生年月日沒(méi)有填。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
  include("foot.inc.php");
    exit();
}
if(strlen($year)!=4 || strlen($month)!=2 || strlen($day)!=2){
    echo"<br><center><font color=blue>輸入的年月日不正確。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
  include("foot.inc.php");
    exit();
}
if (!eregi("^[_/.0-9a-z-]+@([0-9a-z][0-9a-z-]+/.)+[a-z]{2,3}$",$email)) {
echo"<br><center><font color=blue>E-Mail地址格式不對(duì)。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
    }
if($tel==""){
    echo"<br><center><font color=blue>聯(lián)系的電話不能為空。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if(strlen($tel)!=11 || strlen($tel)!=12 || strlen($tel)!=13){
    echo"<br><center><font color=blue>聯(lián)系的電話長(zhǎng)度不正確。請(qǐng)</font><a href=Javascript:history.go(-1);>返回</a></center><br>";
    include("foot.inc.php");
    exit();
}
if($gender==""){
    $null1="空";}
if($xueli==""){
    $null2="空";}
if($money==""){
    $null3="空";}
if($addr==""){
    $null4="空";}
      $birthday="$year.-.$month.-.$day";
      $time=time();
      $conn=@mysql_connect("localhost");
      $sql=@mysql_select_db("jocky",$conn);
      $result=@mysql_query("select * from user1 where name='$name'" ,$conn);
      $sqldo="insert into user1 (name,truename,password,pwwhat,pwan,personalid,gender,xueli,birth,email,tel,money,addr,time) values('$name','$truename','$password','$pwwhat','$pwan','$personalid','$null1','$null2',";
     $sqldo.="'$birthday','$email','$tel','$null3','$null4','$time')";
      $query=@mysql_query($sqldo,$conn);
      if($query){
      echo"<br><center><font color=blue>恭喜你,你已注冊(cè)成功!請(qǐng)</font><a href=index.php>登錄</a></center><br>";
        exit();
          }else{
              echo"<br><center><font color=blue>服務(wù)器忙,不能為你注冊(cè),請(qǐng)稍后再注冊(cè)!</font><a href=index.php>回主頁(yè)</a></center><br>";
          }
        @mysql_close($conn);
?>
</div>
<?include("foot.inc.php")?>
</body>
</html>

php技術(shù)用戶的詳細(xì)注冊(cè)和判斷,轉(zhuǎn)載需保留來(lái)源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 色爱区综合激月婷婷激情五月 | 91丨九色丨首页在线观看 | 国产福利小视频在线播放 | 色呦呦网页 | 色5月综合| 国产三级国产精品国产普男人 | 精产国品一二二区视 | 亚洲综合成人在线 | 91精品啪在线观看国产 | 欧美激情一区二区三区中文字幕 | 亚洲韩国欧美一区二区三区 | 日韩精品中文字幕一区三区 | 图片专区亚洲 欧美 另类 | 成人国产在线视频 | 日本一区二区免费看 | 91青青在线视频 | 性感美女一级毛片 | 久久鬼 | 中文字幕精品一区 | 精品一区二区三区五区六区七区 | 拍真实国产伦偷精品 | 国产精品中文 | 91国自产精品中文字幕亚洲 | 人人澡人人模人人添 | 美女一级毛片毛片在线播放 | 日本美女久久 | 一级囗交片 | 91视频原创| 日韩亚洲欧洲在线com91tv | 国产精品福利一区二区 | 91精品国产乱码久久久久久 | 91手机视频在线 | 中文字幕亚洲一区二区三区 | 午夜毛片视频 | 亚洲第一页综合 | 欧美性在线播放 | 亚洲一区 在线播放 | 婷婷六月激情 | 91国内外精品自在线播放 | 黄视频在线观看网站 | 中文一区二区 |