Re: Can't Read Cookie - URGENT! PLEASE HELP!
| From: | Joao Prado Maia | Date: | Tue, 12 Sep 2000 22:56:04 +0000 |
| Subject: | Re: Can't Read Cookie - URGENT! PLEASE HELP! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16459@lists.php.net to get a copy of this message | ||
On Tue, 12 Sep 2000, Jesse Binam wrote:
> Hello,
>
> The script setting the cookie is in a subdirectory. I can read the cookie
> from the script in the subdirectory but I need to access it from the root
> directory. I don't get this at all!!! please respond.
>
> Here is the code that seems to have the problem
>
> script 1:
>
> // check if cookie exists
> if($PCDPoll == "1")
> // cookie exists
> $poll_voteValid = 0;
> else
> // cookie does not exist yet, set one now
> setCookie("PCDPoll", "1", time()+604800, "/",
> ".pcdiscounters.com");
>
> script 2:
>
> if($PCDPoll == "1")
> poll_viewResults(1);
> else
> poll_generateUI(1,
> "http://www.pcdiscounters.com/index.htm");
>
Indeed, something like that was also happening to me. I was trying to set
a cookie to use the ".blahblah.com" domain parameter, and it worked fine
on Internet Explorer, but not on Netscape.
I just removed the path and domain parameters and now it works, but it's
not being restricted to any path or anything like that. It sucks, but oh
well.
Regards,
Joao
--
Joao Prado Maia
Web Developer
Kefta.com, Inc