how 2 end session automatically when browser is closed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anujphp
Forum Commoner
Posts: 25
Joined: Wed Nov 05, 2008 10:12 am

how 2 end session automatically when browser is closed

Post by anujphp »

hello
i need a help to log out session when browser is closed ...can anyone provide me the code
THANK YOU IN ADVANCE
cavemaneca
Forum Commoner
Posts: 59
Joined: Sat Dec 13, 2008 2:16 am

Re: how 2 end session automatically when browser is closed

Post by cavemaneca »

if you are using any $_SESSION['variable'] it should be erased anyway when the browser is closed. If you use cookies to very session then maybe that's why it stays logged in. Also, set up a script to write into the cookie how long until it expires.
anujphp
Forum Commoner
Posts: 25
Joined: Wed Nov 05, 2008 10:12 am

Re: how 2 end session automatically when browser is closed

Post by anujphp »

THANKS YOU
I am using session...
Post Reply