cookie取不到值??
admin.php页面部份程序:
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
<tr>
<td>
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="sx">
<form method="POST" action="admin1.php">
<tr>
<td width="23%" align="right" class="Y">登录管理</td>
<td width="77%">用户名:
<input type="text" name="user_name" class="an">
用户密码:
<input name="password" type="text" class="an" id="pass">
<input name="Submit" type="submit" value="登录" class="an">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
admin1.php源程序??
<?php
if(isset($_POST["user_name"])){
//之前进行一些用户登陆的判断
setcookie("user_name", $_POST["user_name"]);//设置用户名COOKIE,60秒后过期
setcookie("password", $_POST["password"]);
//完成后再根据需要进行转向
}
if($_COOKIE)
{
echo "对的";
}
?>
怎么我第一次运行admin.php进行登录时,admin1.php输不出来 "对的"
关掉浏览器后,再次登录,发现已存入cookie了,输出"对的"
这是什么原因呀???