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
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
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
ed
into at some stage. I personally think the cookie should be available as
soon as it is set.
Regards
Andy
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Andy Woolley" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTE
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
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