I have a site that has an admin area which lists all the users -- clicking a link within that admin area will then open a new window and automatically log you in as that user.
Problem: the session data in the new window overwrites the session data in the original window, so that you are suddenly no longer logged in as an admin in the parent window, but as the user from the popup/child.
I believe I want to use session_name() to indicate that these are two separate sessions, right? But session_name() has to be used before session_start() -- so how am I supposed to know which session I am in, so that I can name the session correctly on each page? Am I going to have to pass a variable to every page within the pop-up to indicate which session I am in?
Am I making any sense? 😕