Mutley Posted January 6, 2007 Share Posted January 6, 2007 How do I delete/destroy cookies for example when logging out? At the moment I just give it false information but it seems a easy way round and causing me problems.Thanks. Link to comment https://forums.phpfreaks.com/topic/33156-destroy-cookies/ Share on other sites More sharing options...
magic2goodil Posted January 7, 2007 Share Posted January 7, 2007 [code]<?phpif(isset($_COOKIE['yourCookie'])){ setcookie('yourCookie', '', time()-60*60*24,'/'); \\where yourCookie is the cookie name, '' makes it empty, and the time is reversing the default time of cookies. and the / is the default path}?>[/code] Link to comment https://forums.phpfreaks.com/topic/33156-destroy-cookies/#findComment-154556 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.