Re: PHP 4.0 Bug #6162 Updated: setcookie("<cookiename>") doesn't clear the previous set cookie anymore

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: PHP 4.0 Bug #6162 Updated: setcookie("<cookiename>") doesn't clear the previous set cookie anymore
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-28907@lists.php.net to get a copy of this message
On 15 Aug 2000, Bug Database wrote: > setcookie("test"); > > Deletes the cookie like it should in my system. > Are you trying to set and delete the cookie in same script? > The order in which this should be done is different in php3 and php4. It deletes the cookie from a different script (logout.php3) and as for the order.... I think I have it right, there are at least no errors saying I was trying to modify the header after sending data to the browser. I must say though: it is not acctualy one cookie, but a cookie array so the thing I'm trying to do in the first place is: <?php setcookie("auth[0]","login"); setcookie("auth[1]","fullname"); ?> and then in logout.php3: <?php setcookie("auth[0]"); setcookie("auth[1]"); ?> note: this example has only 2 entries, in the real thing I use 5 setcookies, so I will have auth[0] to auth[4] -Arjan

« previous php.dev (#28907) next »