So, this is probably a very general question that can probably become complex...
I have login page with multiple users that have access. Once they login I create some $_SESSION[]'s w/ static names. For example:
$_SESSION['user'] = $user;
$_SESSION['userNo'] = $userNo;
$_SESSION['ticket'] = $ticket;
//etc..
Today I had person testing and using different user accounts. Though, instead of using the log out that unset()'s those static sessions they were just opening a new tab in the browser. So, those $_SESSION[]'s were holding original data from their first test.
Doing some searching I saw setting a unique token and adding that to the URL & DB and making sure those match while the user navigates. If the URL & DB token don't match log that user out. Seems like a pretty straight forward solution.
Are there some other common practices you could point me towards or other concepts I should consider with this type of user system.
I apologize this is so open ended and appreciate any feedback.