Why do you need to delete all the cookies when the browser closes? It sounds like you should be using sessions instead of cookies. If you don't want the server to remember its clients a session would work great because it is only valid for as long as the browser is open or a predetermined time. Still don't know why you want to delete the cookies.
Have a solution if you need it. In order to delete a cookie you need to expire that cookie.
setcookie('nameOfCookie', 'valueOfCookie', time() - 3600);
the code above will expire a cookie making it unusable.
Last edited by msherburne84; March 12th, 2010 at 08:19 PM..
|