My site requires user to login. Say you log in as "John". Then you open up another window, and login as "Sarah". If you switch over to "John", now it's got Sarah's information! You can't gaurentee "John" will log out before Sarah uses it, so how do I keep them seperate?
Thanks very much.
Sessions mixing up?
Moderator: General Moderators
I guess you're using sessions. By default cookies are used to store session identifier...Put in other way per one domain a single identifier...
1. I suggest you don't allow people login with different user/pass and working simultanuously (if they want to....just will run two separate browsers)
2. If you still want to make it using different names at same tim...well you should change logic into storing user specific stuff in session, if you use $_SESSION['user_id'] That will perhaps be changed to $_SESSION['users']['id_1'] $_SESSION['users']['id_2'] etc etc...and have logic to trace per user basis ...but it is highly unlikely you want this behaviour.
1. I suggest you don't allow people login with different user/pass and working simultanuously (if they want to....just will run two separate browsers)
2. If you still want to make it using different names at same tim...well you should change logic into storing user specific stuff in session, if you use $_SESSION['user_id'] That will perhaps be changed to $_SESSION['users']['id_1'] $_SESSION['users']['id_2'] etc etc...and have logic to trace per user basis ...but it is highly unlikely you want this behaviour.