|
Posted by GregoryD on 10/08/06 19:19
I'm going to try to simplify this issue as much as possible.
In my public_html/ directory, I have a login script that sets a cookie to be
used for authentication purposes. To set the cookie, it has something like
this:
<?php
setcookie('code',$value, time + $lifetime, '/', '.example.com');
?>
This, to my knowledge, is supposed to set a cookie named code with a value
of $value and an expiration date of time + $lifetime. Additionally, it is
to be read in public_html and all subdirectories over the entire domain of
*.example.com
Yet if I'm trying to get the value of the cookie, as in:
<?php
$cookie = $_COOKIE['code'];
echo $cookie;
?>
in a subdirectory, say public_html/auth/, the result of the second script is
nothing. If I put that same script in the public_html/ directory, it'll
print out my $value.
I'm using php 4.3
Any thoughts?
GregoryD
Navigation:
[Reply to this message]
|