If I write the cookie like this:
setcookie ("test", "robots")
I can retrieve it fine with:
echo $HTTP_COOKIE_VARS["test"]
If I write a cookie with:
setcookie ("test", "robots", time() + 3600, "/", ".mydomain.com", 1)
I see the file show up in my cookies directory. But when I go to retrieve with:
echo $HTTP_COOKIE_VARS["test"]
I get nothing.
Am I missing something? I've looked everywhere.
RR
I've read all "cookie" threads..I write but can't
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Have you done a:
to check if any cookie can be retrieved.
Have you tried putting your full domain instead of '.mydomain.com' - just for testing.
Mac
Code: Select all
echo '<pre>';
print_r($HTTP_COOKIE_VARS);
echo '</pre>';Have you tried putting your full domain instead of '.mydomain.com' - just for testing.
Mac
- Sevengraff
- Forum Contributor
- Posts: 232
- Joined: Thu Apr 25, 2002 9:34 pm
- Location: California USA
- Contact:
- Sevengraff
- Forum Contributor
- Posts: 232
- Joined: Thu Apr 25, 2002 9:34 pm
- Location: California USA
- Contact:
Re: I've read all "cookie" threads..I write but ca
the 1 at the end there means secure is on. should be3dron wrote:If I write a cookie with:
setcookie ("test", "robots", time() + 3600, "/", ".mydomain.com", 1)
I see the file show up in my cookies directory. But when I go to retrieve with:
echo $HTTP_COOKIE_VARS["test"]
setcookie ("test", "robots", time() + 3600, "/", ".mydomain.com", 0)
if you don't want secure on.