How do you delete a cookie on the spot?
| From: | Daniel Anderson | Date: | Sun, 30 May 2004 22:56:47 +0000 |
| Subject: | How do you delete a cookie on the spot? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23891@lists.php.net to get a copy of this message | ||
Hi, can anyone tell me how to clear a cookie when the line comes up?
Because the following: setcookie("name",""); does work yes, but not well enough.
I need it to remove that cookie there and then.
For example:
You go through a login process to access a page, it sets a cookie with username and password so it
registers you as being logged in.
When you click a link which directs you to a logout page, it will clear the cookie.
This is all well and good but if you retype the url to get back to the page, e.g. http://server/main/ it will still state that you have logged in.
This seems to be flying all over the place, can anyone help? Please don't direct me to the PHP
Manual or any other place as I have already checked.
Many thanks,
Dan