nt>";
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>
第三个是:check.php(判断注册资料是否正确,然后插入数据库,重新登录)
<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
<tr>
<td><font color="#ff0000">当前位置:<a href="index.php">主页</a>>><a href=zcyh.php>注册页面</a>>>详细资料</font></td>
</tr>
</table><br>
<?
if($truename==""){
echo"<br><center><font color=blue>真实姓名不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($password==""||$repassword==""){
echo"<br><center><font color=blue>密码不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($repassword!=$password){
echo"<br><center><font color=blue>两次输入的密码不一样。请</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>密码的长度不符合要求。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($pwwhat==""){
echo"<br><center><font color=blue>密码提示问题不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($pwan==""){
echo"<br><center><font color=blue>密码提示答案不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($personalid==""){
echo"<br><center><font color=blue>身份证号码不能为空。请</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>输入的身份证号码不是15位或18位。请</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>出生年月日没有填。请</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>输入的年月日不正确。请</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地址格式不对。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($tel==""){
echo"<br><center><font color=blue>联系的电话不能为空。请</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>联系的电话长度不正确。请</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>恭喜你,你已注册成功!请</font><a href=index.php>登录</a></center><br>";
exit();
}else{
echo"<br><center><font color=blue>服务器忙,不能为你注册,请稍后再注册!</font><a href=index.php>回主页</a></center><br>";
}
@mysql_close($conn);
?>
</div>
<?include("foot.inc.php")?>
</body>
</html>
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>
第三个是:check.php(判断注册资料是否正确,然后插入数据库,重新登录)
<?include("header1.inc.php")?>
<div align=center>
<table width="89%" border="0">
<tr>
<td><font color="#ff0000">当前位置:<a href="index.php">主页</a>>><a href=zcyh.php>注册页面</a>>>详细资料</font></td>
</tr>
</table><br>
<?
if($truename==""){
echo"<br><center><font color=blue>真实姓名不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($password==""||$repassword==""){
echo"<br><center><font color=blue>密码不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($repassword!=$password){
echo"<br><center><font color=blue>两次输入的密码不一样。请</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>密码的长度不符合要求。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($pwwhat==""){
echo"<br><center><font color=blue>密码提示问题不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($pwan==""){
echo"<br><center><font color=blue>密码提示答案不能为空。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($personalid==""){
echo"<br><center><font color=blue>身份证号码不能为空。请</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>输入的身份证号码不是15位或18位。请</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>出生年月日没有填。请</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>输入的年月日不正确。请</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地址格式不对。请</font><a href=javascript:history.go(-1);>返回</a></center><br>";
include("foot.inc.php");
exit();
}
if($tel==""){
echo"<br><center><font color=blue>联系的电话不能为空。请</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>联系的电话长度不正确。请</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>恭喜你,你已注册成功!请</font><a href=index.php>登录</a></center><br>";
exit();
}else{
echo"<br><center><font color=blue>服务器忙,不能为你注册,请稍后再注册!</font><a href=index.php>回主页</a></center><br>";
}
@mysql_close($conn);
?>
</div>
<?include("foot.inc.php")?>
</body>
</html>