I'm attempting to set a cookie but the behavior isn't what I'm expecting. I'm thinking that a cookie is much like a session in that the array value will be made immediately available. In the case of this cookie that I've set, the value isn't available immediately and I need to refresh my browser one time to get the value. Is this right?
Asked
Active
Viewed 176 times
1 Answers
5
Yes, that's right.
When you set the cookie, you're sending it to the client. It's not available in the $_COOKIE array until the client sends it back to the server -- in other words not until the next page load.

awm
- 6,526
- 25
- 24
-
1AWM, I'll credit you for your answer when the 8 minute time constraint expires. – jim Feb 15 '11 at 08:57