On Tue, Mar 25, 2008 at 9:49 PM, Andrew Ballard <[EMAIL PROTECTED]> wrote:
> On Tue, Mar 25, 2008 at 9:31 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
>  >
>  >     Is this block of code executed immediately after the cookie is
>  >  set?  Sometimes PHP works too fast for its own good and the client
>  >  doesn't even realize it has a cookie yet.  Try setting it with one
>  >  page and either sleep()'ing for a bit or forcing a link-click or page
>  >  refresh before checking for the cookie.
>
>  Um... Cookie data ISN'T available to the same script that sets it. If
>  you use setcookie(), all it does is send a header to the browser
>  immediately ahead of the output of your script telling the browser to
>  store those values in either memory or on disk. The value will not
>  appear in the $_COOKIE array until the browser requests the next page
>  and includes the Cookie: header as part of the request.

    You're correct. I was saying basically the same thing, but
re-reading it, it sure doesn't look like it in English.  ;-P

    The sentences should've instead been rewritten like so:
        "Try setting it with one page and forcing a link-click or
sleep()'ing for a bit and then refreshing."

    It wasn't meant to insinuate

-- 
</Daniel P. Brown>
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to