Re: [PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Sander Roobol
Please, discuss stuff like this on the appropriate mailinglist! PHP-DEV is for developing PHP, not for developing WITH PHP. Most of you should know that by now :) Sander On 2002.03.13 18:00 Hartmut Holzgraefe wrote: > Andy Woolley wrote: >> Ok, I hear what you are saying and accept that it isn't

Re: [PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Hartmut Holzgraefe
Andy Woolley wrote: > Ok, I hear what you are saying and accept that it isn't a bug but is it not > possible to populate the cookie variable when you set the cookie. > I have had many problems with cookies & PHP in the past, usually due to the > way they work and so anything that can be done to ma

Re: [PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Rasmus Lerdorf
Javascript is client-side. It is a completely different thing. But what you are asking for in a server-side environment makes absolutely no sense. If you do: setcookie("foo","bar"); What you are asking for is for $foo to automatically be set to "bar" by the setcookie() call. This will not

Re: [PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Andy Woolley
D]> Sent: Wednesday, March 13, 2002 3:29 PM Subject: Re: [PHP-DEV] Possible Cookie Bug > You have a basic misunderstanding about how cookies work. The first time > you load up your page nothing is set and you issue: > > setcookie("C_name",$name); > setcookie("C_ema

Re: [PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Rasmus Lerdorf
You have a basic misunderstanding about how cookies work. The first time you load up your page nothing is set and you issue: setcookie("C_name",$name); setcookie("C_email",$email); Since $name and $email are empty, this will generate these SetCookie headers in the response: Set-Cookie: C_nam

Re: [PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Sander Roobol
Not a bug. From the manual: "Cookies will not become visible until the next loading of a page that the cookie should be visible for." See http://www.php.net/manual/en/function.setcookie.php for more. Sander On 2002.03.13 16:19 Andy Woolley wrote: > Hi All, > > I think I might have found a bug

[PHP-DEV] Possible Cookie Bug

2002-03-13 Thread Andy Woolley
Hi All, I think I might have found a bug with cookies but I'm not sure if what is happening is actually a bug or a feature. I personally think it's a bug but there might well be a perfectly valid answer to this situation that I'm not seeing. If I have a cookie set and I then change the value of