session_start();
/*验证*/
if(!isset($_SESSION['admin_name']) || !check_power($_SESSION['admin_name'],0))
{
header('location:other.php');
exit;
}
/*验证*/
if(!isset($_SESSION['admin_name']) || !check_power($_SESSION['admin_name'],0))
{
header('location:other.php');
exit;
}
在你的A页面上
<?php
session_start();
if(empty($_SESSION['superuser']))
{header("location: ../");exit;}
?>
登录成功后设
<?php
session_start();
$_SESSION['xxx']=XXX
?>
验证页:
if(!isset($_SESSION['XXX']||$_SESSION['XXX'<>XXX)
{
header('location:other.php');
exit;
}