logof user dosnt work! cookie deleted, but still nothing!
Moderator: General Moderators
logof user dosnt work! cookie deleted, but still nothing!
Hi!
Im creating a user login script, but I have a problem!!! The default page checks if user hase a cookie, if he dosnt then he get this:
Welcome Guest, you may login or register
When user clicks login and logins with hes username and password and returns to default page he get cookie and this:
Welcome Username.
When I open my cookie folder and delete that cookie, and refresh default page, It still shows Welcome Username., but when I close IE and run it again and when I run defualt page it shows Welcome Guest, you may login or register. After re-rining IE it works, but why dosnt it work after deleting the cookie and clicking refresh?? How to make user logoff script!! I have no idea!!! Thank You!!!
Im creating a user login script, but I have a problem!!! The default page checks if user hase a cookie, if he dosnt then he get this:
Welcome Guest, you may login or register
When user clicks login and logins with hes username and password and returns to default page he get cookie and this:
Welcome Username.
When I open my cookie folder and delete that cookie, and refresh default page, It still shows Welcome Username., but when I close IE and run it again and when I run defualt page it shows Welcome Guest, you may login or register. After re-rining IE it works, but why dosnt it work after deleting the cookie and clicking refresh?? How to make user logoff script!! I have no idea!!! Thank You!!!
You got me wrong!!! When I delete cookie and click refresh there is still Welcome Username, it shows Welcome Guest only then, when I close my prowser and run it again!!!!! I need it after I delete cookie to display:
Welcome Guest, you may login or register!!!
How can I delete that cookie from php, is there a better way to logoof user??
Welcome Guest, you may login or register!!!
How can I delete that cookie from php, is there a better way to logoof user??
- Ixplodestuff8
- Forum Commoner
- Posts: 60
- Joined: Mon Feb 09, 2004 8:17 pm
- Location: Queens, New York
you should look at the manual's page on setcookie()
To delete a cookie set a new cookie with the same name, but make the expiration date sometime in the past.
To delete a cookie set a new cookie with the same name, but make the expiration date sometime in the past.
well this is code for setcookie:
And I deleted cookie just by opening cookie folder and deleting it!!
Code: Select all
<? setcookie("eatthis",$password . "<explode_this>" . $username,time() + 360000); ?>And I deleted cookie just by opening cookie folder and deleting it!!