Re: Cookie effect

From: Date: Sat, 12 May 2001 00:08:39 +0000
Subject: Re: Cookie effect
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9265@lists.php.net to get a copy of this message
I believe that this is the default and only possible behavior. The browser won't return the cookie value until another page is loaded. But since you set the cookie on that page, you should still have access to the variables you used to set the cookie right? From the manual: "Cookies will not become visible until the next loading of a page that the cookie should be visible for." -Jesse At 04:56 PM 5/11/01 -0700, David Balatero wrote:
I have a login script that sets a cookie on your hard drive...the only problem is, the cookie only comes into effect after I've clicked thru to another page from login.php...any ideas on this? My (abridged) code is currently: <?php header("Set-Cookie: LoggedIn=1; path=/;"); header("Set-Cookie: GHSUserName=$username; path=/;"); header("Set-Cookie: GHSUserID=$user_id; path=/;"); ?> If anyone could help me on this one, that would be great! Thanks, David Balatero db@icegaming.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.db (#9265) next »