note 25661 added to function.setcookie
| From: | js at wsco dot com | Date: | Tue, 01 Oct 2002 20:08:16 +0000 |
| Subject: | note 25661 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37482@lists.php.net to get a copy of this message | ||
Hi All,
I'm somewhat of a newbie here.
I copied the script below from this very posting and tried to run it.
It came as a green PASSED.
I said.. Great,. now let me view the little cookie on my machine. I want to see what exactly is it
storing.
But, where is it?
What would be the file name it would be stored as?
My domain name is: WSCO.COM
The page itself is stored at: http://www.wsco.com/test/
I'm using WinXP Professional.
Perhaps this is a WinXP issue, perhaps not, but I don't know how to check this.
Is there a setting in the IE that I need to make? Remember, I got the Green PASSED!. I'm
puzzled with this and can't tell if my coding works. I appreciate your help.
-Alon
js@wsco.com
<?php
$status = 0;
if (isset($myTstCky) && ($myTstCky == "ChocChip")) $status = 1;
if (!isset($CCHK)) {
setcookie("myTstCky",
"ChocChip","time()+3600","/","www.wsco.com");
header("Location: $PHP_SELF?CCHK=1");
exit;
}
?>
<html>
<head><title>Cookie Check</title></head>
<body bgcolor="#FFFFFF" text="#000000">
Cookie Check Status:
<?php
printf ('<font color="#%s">%s</font>
;',
$status ? "00FF00" : "FF0000",
$status ? "PASSED!" : "FAILED!");
?>
</body>
</html>
--
http://www.php.net/manual/en/function.setcookie.php
http://master.php.net/manage/user-notes.php?action=edit+25661
http://master.php.net/manage/user-notes.php?action=delete+25661
http://master.php.net/manage/user-notes.php?action=reject+25661