Topic: php and cookie question

setcookie ('user_name', '', time()-300, '/', '', 0);

Any ideas why that doesn't work to erase the data in my cookie? I know the if loop is executing because things after that in the code are happening fine. I'm not getting an error message - but the value for user_name stays the same. I'd really appreciate any help I could get. Thanks,

paul

Re: php and cookie question

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, or FALSE, and all other arguments match a previous call to setcookie, then the cookie with the specified name will be deleted from the remote client.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: php and cookie question

Thanks - I think i've got it working now.