Cookie is set but not returning

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
centipede
Forum Newbie
Posts: 7
Joined: Thu Sep 04, 2003 9:45 pm

Cookie is set but not returning

Post by centipede »

I have a cookie set using:

setcookie("PHPENGINEUSER", $guid, (time()+2592000), "/", "modules/security");

I know it is set, I can see it in my cookies list in FireFox. But when I try to display it using:

$_COOKIE["PHPENGINEUSER"]

I get no results. Is this enough information to point out where my error is?

Thanks!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Cookie is set but not returning

Post by requinix »

Are you sure $guid has a value? Might there be a problem with subdomains? Are you checking $_COOKIE after the page has been reloaded at least once?
centipede
Forum Newbie
Posts: 7
Joined: Thu Sep 04, 2003 9:45 pm

Re: Cookie is set but not returning

Post by centipede »

There is a value showing when I check that cookie in Firefox. I have tried re-navigating to that page and I still get nothing when I try to display that cookie.
Post Reply