Code Failing To Read Cookie
Posted: Thu Jun 03, 2010 5:07 am
Hi,
I am a beginner in php. I am setting the cookies on one page and validating them on the next one. I can see the cookies being set in Firefox's cookie editor but the code fails to read the cookies. Here is whats happening:
I authenticate and set the cookie on
http://localhost/page/public/index.php
After authentication, i am redirecting the user to one folder up i.e.
http://localhost/page/home.php
home.php is where i am trying to read the cookie value but it shows up blank.
The code reads the cookies fine if I move home.php to /page/public/ from its current location (/page/).
Can someone please suggest a remedy for this?
Thanks in Advance,
Ankit
I am a beginner in php. I am setting the cookies on one page and validating them on the next one. I can see the cookies being set in Firefox's cookie editor but the code fails to read the cookies. Here is whats happening:
I authenticate and set the cookie on
http://localhost/page/public/index.php
After authentication, i am redirecting the user to one folder up i.e.
http://localhost/page/home.php
home.php is where i am trying to read the cookie value but it shows up blank.
The code reads the cookies fine if I move home.php to /page/public/ from its current location (/page/).
Can someone please suggest a remedy for this?
Thanks in Advance,
Ankit