Hello Andrew,

On 29 Jan 2004 at 21:05, Andrew Wood wrote:

> I'm calling it with the same arguments as I used to set it originally, 
> but with a null string value & an expiry time in the past but the 
> cookie persistently remains in the browser.

>From the PHP manual:

"Cookies must be deleted with the same parameters as they were set with. If the value 
argument is an empty string (""), and ALL OTHER ARGUMENTS match a previous call 
to setcookie, then the cookie with the specified name will be deleted from the remote 
client."

Also from the PHP manual:

"Cookies will not become visible until the next loading of a page that the cookie 
should 
be visible for."

Don't know if the second snippet bears on your problem, but it might be worth 
considering.

Do you specifically need to use cookies for some reason? If you don't, consider using 
session variables. (Session variables involve cookies, but they're all set and removed 
automatically by PHP without your having to worry about it.)

Lastly, do you have some kind of firewall running on the machine on which you're 
testing your scripts? ZoneAlarm, for example, does all sorts of weird things to PHP 
sessions, and since sessions often depend on cookies, who knows? I really don't 
understand very well how firewalls interact with Apache/PHP, but this is definitely 
something else worth considering.

Good luck,

Erik

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to