Forum Moderators: coopster
-------------------------------------------------
TEST PROCESS:
1. cleared ALL cookies.
2. ran t2.php.
3. got these results:
------ in cookie test ------
gt1=[]
password =[passwd123]
lct1 =[]
------ end cookie test ------
4. looked at my cookies. I had 1, 'lct1'
5. ran t2.php AGAIN.
6. Got these results
------ in cookie test ------
gt1=[passwd123]
password =[passwd123]
------ end cookie test ------
It has the appearance as though after the 'setcookie' command, there is not enough processing time to have
the value set before the value is retrieved.
Please try this simple test and let me know?
Or if you see what I am not seeing please let me know.
On subsequent requests, users will send that cookie back in their request. (If they so choose.)
$_COOKIE is an array of all cookies that the user has sent during the current request.
So, the request your setcookie() is available during is the next request -- not the current request.