I have apache and php setup on windows xp.
I setcookie with 1 hour expiration with path = '/'.
setcookie ("pvid",time()+3600,"/")
And I'm having problem getting the cookie value at index.php.
At index.php
I have 2 home link:
one link to http://localhost/site1/ and http://localhost/site1/index.php
I can get the cookie value if I go to http://localhost/site1/ from other pages by type the url address and hit enter at addressbar.
When I refresh the value is still there
Once I'm at http://localhost/site1/, If click at home link either http://localhost/site1/ or http://localhost/site1/index.php
I will not be able to get the cookie value.
and when I hit refresh I'm still not able to get the value
I can only get the value again if I get to the page by type the url at addressbar and hit enter or type the following.
http://localhost/f3s/?randomvar=randomvalue
Looks like I'm having problem with cache. I also tryied put
header("Pragma: no-cache");
at the very top of index.php and it still doesn't solve it.
Can anyone help me on this.
Thanks
Zigma