will this not work...

   if (($HTTP_COOKIE_VARS["foo"] != 'bar') && ($HTTP_GET_VARS["set"] !=
true)) {
    SetCookie("foo", "bar");
    header("Location: $PHP_SELF?set=true");
   }

at the top of the page. or is this what is unreliable on some browsers?

jamie.

----- Original Message -----
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Richard S. Crawford" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 9:02 PM
Subject: Re: [PHP] FW: Cookies, Dammit!


> > 1. Set cookies to a particular value (e.g., foo=hi and bar=ho), AND
> > 2. Redirect the user to a new page in a different directory?  AND
> > 3. have the new page be able to retrieve the values of both foo and bar?
>
> No, 1. and 2. can not be done in the same request reliably.  Some browsers
> can handle it, others can't.
>
> -Rasmus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to