How do you delete a cookie on the spot?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux