在admin表中多加了个字段 shdanwei(审核单位),不同的管理员登陆,对应不同单位的数据,
<?
session_start();
if($_SESSION['admin']=="")echo"<script language=javascript>alert('请先登陆!');window.location.href='login.php';</script>";
require_once('../config.php');
$admin=$_SESSION['admin'];
$link_id = mysql_connect($dbhost,$dbuser,$dbpwd);
mysql_select_db($dbname);
mysql_query("set names 'gbk'"); 
$str="select shdanwei from admin where name='$admin'";
$shdanwei=$rs[shdanwei];
?>
可为什么提取的$shdanwei 是空的呢?下面的<a href="Audit.php?shdanwei=<?=$shdanwei?>" target="main">审核中</a>用到$shdanwei,浏览的网页属性显示:
http://199.168.8.131/admin_login/Audit.php?shdanwei=shdanwei=为空,表中是有内容的。