xgmm_ok.php

来自「php做的一个在线考试系统」· PHP 代码 · 共 20 行

PHP
20
字号
<?php session_start(); include("conn/conn.php");
if($_SESSION[online_number]==true){

$number=$_POST[online_number];
$pass=$_POST[online_pass];
$passes=$_POST[online_pass2];
	$query=mssql_query("select * from tb_user where online_number='$number' and online_pass='$pass'");
	if(mssql_num_rows($query)<1){
		echo "<script>alert('您输入的准考证号码和密码不符,请重新输入!'); window.location.href='index.php?online=修改密码';</script>";
	}else{
		$querys=mssql_query("update tb_user set online_pass='$passes' where online_number='$number'");
		if($querys){
			echo "<script>alert('密码更新成功!'); window.location.href='index.php?online=修改密码';</script>";
		}
}

}else{
echo "<script> alert('请您正确登录!'); window.location.href='index.php?online=用户登录';</script>";
}
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?