Global Independent variables in the same browser.

Hi guys, I consulted to see what ideas they can give me, I mention my problem:

I have an application which has different user groups, which are logged with user and password, any normal application. According to the group to which the user belongs operate differently through the menus to be enabled. To control this type of global variables are used to store the “groupId” to which it belongs or that “IdSede” is specifically operating. So far so good. The problem is when a user has two ways to login, either by example as Administrator or User, a browser opens two windows and logs in two different users. Global variables control are pressed each other, taking values ​​of the last assignment that the user performed in the window that is working, then he jumps to the other window, these variables contain incorrect values, since they were modified in another area.

My question is this:

  1. Is there any way that the variables are independent of how many windows and logins are made in the same browser? this would be ideal.
  2. Case wont Impossible 1, there is the possibility that in the same browser user can open only one instance of the program?
  3. I accept any idea and suggestion …

Greetings to all …

Leandro,

Global variables are stored in the session data. Browsers share sessions among all currently open tabs/windows.

More info: http://www.scriptcase.net/forum/showthread.php?7384-Issues-with-database-connections-it-is-being-cached-in-Chrome-IE-browsers&highlight=phpsessid

You can use “Open New Private Window” in FireFox to open a second window that uses a different session. All browsers have this capability, some call it things like “Incognito Window”, etc., but this would be a manual solution only.

Dave

Dave thank you very much for your time and for your answer. I’ll See this link you send me, but what I see is unlikely to resolve this.
Leave me a quieter side and the other, somewhat worried that the variables that are pressed or cross each other, this will generate a major problem in my application. I will try to block by mac address of the PC in execution for two instances of the application is not open.
Any suggestions would help me a lot.
I take this opportunity to send a greeting.