I am running into some issues with my application and how it
maintains session variables.
What I do is based on what username/password is entered, I
find the record in the database and set the account_id as a session
variable. Therefore when the user goes through the app, it can
query account specific content based on the session.account_id. I
just noticed today that when I sign in as one account, and then
sign in as another, both account_id's randomly appear. In additon,
I have noticed erratic session timeouts.
Would anyone have any suggestions on a better methood???
You could be experiencing an issue with your browser caching
the page you are calling.
Say you log in as account 1 and visit pages A, B and C.
You then log in as account 2 and visit pages D, B, E
There is a chance that the second time you visit page B, you
will see the same information as you did when you were logged into
account 1 because the browser cached the page results and can not
detect the change in server variables. Holding shift-refresh will
usually force the browser to load the page again, not just use a
Check that first to see if that is your problem. Do you only
get the erratic session timeout issue when you log into 2
concurrent accounts or does it happen in general on your