![]() |
Delete Cookie ..
Hey .
I am working on a loggin system built on setting cookies for users , setcookie(Username, Value, time()+300); //Cookie Ends after 5 Minutes and now i want to logout this user so i used to delete the cookie setcookie(Username, Value, mktime(12,0,0,1, 1, 1990)); //Cookie will end at past time so it will be deleted immediatly so after all of that , the cookie still exist i dont know what to do please any one help me |
I recall there being a simpler way to reset or delete cookies. If you google this topic, you will find that you should be able to reset a cookie by simply specifying it name only.
:
setcookie("test");That code would reset the cookie named test to basicly nothing. |
[php]setcookie("cookiename", "", time()-300);[/php]
|
@BlazingWolf
My Code is Similar to yours and its didnt work @Booooze The Code didnt work to so when i go to the url to the page it must say "you r not signed in" but it worked , i waited till the cookie expired and it said that successfully , so whats wrong |
| All times are GMT -5. The time now is 3:01 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC