if($xuehao==""||$name==""||$class==""||$password==""||$pas"/>
PHP头条
热点:

一个关于登记的php页面


一个关于注册的php页面




学生注册



//######################学生注册##########################
  include "config.php";
  include "header.php";?>
 if ($xuehao=="" ||$name=="" || $class=="" ||$password=="" ||$password1=="" ||$telephone=="") 
{
echo"请把信息添写完整

";
echo "";
exit;
}

$query="select * from $student_infor where no='$xuehao' and name='$name'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
if($row==0)
{
 echo"你输入的信息有误,不属于计算机学院毕业生!

";
 echo "";
 exit;
}


$query="select * from $student_table where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
if($row!=0)
{
 echo"此学号已注册,请重新填写!

";
 echo "";
 exit;
}

 
 if($password!=$password1)
 {
     echo"输入的密码不一致,请重新输入!

";
 echo "";
 exit;
 }

 $query="insert into $student_table values('$xuehao','$name','$sex','$class','$password','$love','$telephone','$reward','')";
 mysql_query("set names 'GB2312'");
 $result=mysql_query($query);
 if($result==true){
  echo "注册成功!

";
  echo "";
  exit;
  }
?>



分享到:
------解决方案--------------------
register.php 
extract($_POST); //加上这句
 if ($xuehao=="" 
------解决方案--------------------

www.phpzy.comtrue/phprm/6552.htmlTechArticle一个关于登记的php页面 一个关于注册的php页面 学生注册 //######################学生注册########################## include"config.php"; include"header.php";?> if($xuehao==""||$name==""||$class==""||$password==""||$pas...

相关文章

相关频道:

PHP之友评论

今天推荐