我正在开发一个我想允许的登录系统: - 管理员用户只能看到管理页面 - 员工用户只能看到员工页面
<?php { include('Connection.php');
$s = oci_parse($ora_conn, "select OPRID,OPERPSWD,OPRTYPE from OPERATOR where OPRID =
:uname and OPERPSWD = :upass");
oci_bind_by_name($s, ":uname", $_POST['OPRID']);
oci_bind_by_name($s, ":upass", $_POST['OPERPSWD']);
oci_execute ($s);
$r=oci_fetch_array($s,OCI_DEFAULT);
$OPRTYPE =($r)
if $OPRTYPE = 'Employee';
{
header("Location:Login_As_Employee.php");
}
elseif($r ='Admin')
{
header("Location:Login_As_Admin.php");
}
else
{
header("refresh:0;url=sign_in.php");
echo'<script>alert("Invalid User!")</script>';
exit();
} oci_free_statement($s);
oci_close($ora_conn);
}
?>