rivka wrote:I'll have to think about your suggestion -- I was trying similar stuff before, but the problem I'm having is, how can you "test to see $_SESSION['childSessionName'] is set and activate that one" without calling session_start() to access the session data? It's an unworkable circle -- you'd be storing some info in the session data, but you can't access it until you call session_start() at which point it's to late to set which session you are using, since session_name has to be set before session_start, no?
Yeah, I have been pondering that as well (from about the time I mentioned it last night haha, anyhow, what about this. In your code, how about adding page id's to your pages that get parsed and passed to the next page.
For example
<input type='hidden' pageID='childPage'>
Then in your script, you could have
if($_SESSION['childSessionActive' == true) {
$UserLoggedIn = $_SESSION['childSessionUser'; } else {
$userLoggedIn = $_SESSION['mainSessionUser';
}
then you can use the same session, but have different values for what user is logged in based on what 'page' they are on, rather than having a separate sessionID for each.