cookie crumbles
| From: | John Taylor-Johnston | Date: | Mon, 01 Sep 2003 04:49:08 +0000 |
| Subject: | cookie crumbles | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161339@lists.php.net to get a copy of this message | ||
I create this cookie, using Javascript::
testals.flsh.usherb.ca FALSE / FALSE 1062433227 weather.htm99999995 1
If the browser is reloaded, I want php to read the cookie and do my else statement.
Even after a browser shut-down and restart, I cannot get PHP to read the cookie (first part of my if
statement).
If I use phpinfo(), it does confirm that:
_COOKIE["weather.htm99999995"] = 1
What weird quirk have I missed this time?
<?php
$StudentId = "weather.htm99999995";
if (!isset($_COOKIE["weather.htm$StudentId"]))
{
echo "Cookie not found, not reading weather.htm$StudentId<br>";
echo "\$_COOKIE[\"weather.htm$StudentId\"]".
$_COOKIE["weather.htm$StudentId"]."-<hr>";
}else{
echo "cookie found, yay!
".$_COOKIE["weather.htm$StudentId"]."-<hr>";
#phpinfo();
}
?>