DJTim666 Posted October 9, 2007 Share Posted October 9, 2007 I have tried to use; setcookie("lala", "lalala", time() - 1); and it doesn't work... Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/ Share on other sites More sharing options...
MasterACE14 Posted October 9, 2007 Share Posted October 9, 2007 I have tried to use; setcookie("lala", "lalala", time() - 1); and it doesn't work... use a more larger time like this: <?php setcookie("lala", "lalala", time() -3600); thats 3600 seconds, which is 1 hour. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365076 Share on other sites More sharing options...
DJTim666 Posted October 9, 2007 Author Share Posted October 9, 2007 Still not working Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365081 Share on other sites More sharing options...
john010117 Posted October 9, 2007 Share Posted October 9, 2007 Make sure the cookie name is correct. Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365082 Share on other sites More sharing options...
DJTim666 Posted October 9, 2007 Author Share Posted October 9, 2007 Yes, it's correct . It just doesn't want to unset itself o_O Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365083 Share on other sites More sharing options...
pocobueno1388 Posted October 9, 2007 Share Posted October 9, 2007 Try putting this: <?php if (isset($_COOKIE['lala'])){ setcookie("lala", "lalala", time() -3600); } else { echo "This cookie doesn't exist"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365084 Share on other sites More sharing options...
DJTim666 Posted October 9, 2007 Author Share Posted October 9, 2007 I clicked logout in IE and it worked. But it won't work in my other browsers... Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365088 Share on other sites More sharing options...
MasterACE14 Posted October 9, 2007 Share Posted October 9, 2007 it should work, the only reason why it may not work in other browsers is because you/they don't have cookies enabled on the other browsers. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/72388-solved-unsetting-cookies/#findComment-365136 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.