时间:2021-07-01 10:21:17 帮助过:7人阅读
//######################学生信息修改1##########################分享到:
include "config.php";
include "header.php";
?>
修改学生信息
extract($_REQUEST);
$query="update $student_table set name='$name1' where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query="update $student_table set sex='$sex1' where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query=mysql_query("update $student_table set class='$class1' where xuehao='$xuehao'");
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query=mysql_query("update $student_table set password='$password2' where xuehao='$xuehao'");
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query=mysql_query("update $student_table set password1='$password3' where xuehao='$xuehao'");
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query="update $student_table set love='$love1' where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query="update $student_table set telephone='$telephone1' where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
$query="update $student_table set reward='$reward1' where xuehao='$xuehao'";
mysql_query("set names 'GB2312'");
$result=mysql_query($query);
if($password2!=$password3)
{
echo"输入的密码不一致,请重新输入。
";
echo "";
exit;
}
if($result==true)
{
echo"修改信息成功!";
echo "";
exit;
}
else
{
echo"修改出错,请返回重新修改。
";
echo "";
exit;
}
?>