<?PHP
require_once 'db.php';
$sql="SELECT * FROM `gm_user` where (`user` = '".$_COOKIE[zhanghao]."') and (`ip` = '".$_SERVER["REMOTE_ADDR"]."') ";
$query=$db->query($sql);
$userdata= $db->fetch_array($query);
if($_COOKIE[mima]<>$userdata[pass] or $_COOKIE[zhanghao]==null){

echo("你已经掉线或尚未登录");
exit();
} 
?>