another session problem

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
leoric1928
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2004 7:21 pm

another session problem

Post by leoric1928 »

Good day,

I am having a problem with my session. The scenario is this, whenever a user logs on to my application it creates a session then after the user is done he must log off so the session will end. But what if the user does not log off, he just close the browser then he logs on again as a different user and the session timer does not yet reach the the timeout that I set, and since the session is still active the user will see the profile of the previous user not the one he logged on. How will I correct this problem? Tnx
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

A session will automatically stop if the browser is closed. No need for a expiration time, this is all taken care of for you :D
leoric1928
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2004 7:21 pm

Post by leoric1928 »

But whenever I close the browser and relogon as a different user, the profile that I see is the previous user not the one i logged on. what seems to be the problem here? tnx
User avatar
Michael 01
Forum Commoner
Posts: 87
Joined: Wed Feb 04, 2004 12:26 am

Post by Michael 01 »

Do you have track vars, or global_sessions on ?
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

what does your code look like where you set the session vars?

you probably used a experiation time, which isnt necesary..
Post Reply