If PHP is strictly server side, like CF, like I'm sure it is, I would assume
that it can't set a cookie, redirect, and then read that same cookie.  CF
code is parsed strictly on the server side and only the resulting HTML and
JavaScript are sent to the browser.  Therefore, the cookie is basically
being set and called during the same server side interaction when the 'code'
hasn't even been passed to the client for the cookie to be set.

Redirects in ColdFusion are handled server side .. I.E. CF code is parsed
and then redirected, where more CF code is parsed, in your case, before
anything is sent to the client.  It's kinda like a <CFInclude> that doesn't
do anything but server based stuff.  Nothing will ever get sent to the
client.  PHP probably operates in the same way.

Todd Ashworth

----- Original Message -----
From: "David Huyck" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Tuesday, November 21, 2000 7:43 PM
Subject: Re: PHP-Fusebox: Bombusbee.com


> > Does PHP have the problem of setting a cookie after a redirect?
> My impression is that PHP cannot both write a cookie and then read it back
> out in the same request.  I was having trouble with that where I would set
a
> session variable, then try to read it from the session by using
> $HTTP_SESSION_VARS["blah"].  Of course, it wasn't in there yet cuz the
> current request hadn't gotten that var into the @HTTP_SESSION_VARS yet...
> My suspicion would be that same thing is happening with the cookie:  It
can
> send the request to the browser to write the cookie in one request, but it
> has to wait until the next request to read it back out (if the browser
> actually wrote the cookie... )
>
> David Huyck
> [EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to