Riaan Stander wrote:
> Hi there
> I know this is not a php specific question, but I don't know where else to
> I've got the following situation. The website I'm currently working on has
> got a administration page where the administration user must be able to
> login as all the users available. It is fine getting all the data, but I
> want to open the login in a new browser window, otherwise the administrator
> has go to re-login with his account. Thus, I need to somehow open a new
> browser window, with a new session id. When somebody logs in I check to see
> if there is already a session variable registered. If there is, I unset this
> variable, and register a new one for the login account. You can see where my
> problem is. At this stage I'm using some java script "window.open()" to open
> the new window, but it is still with the save session id.
> If any of you can tell me how to open a new browser window with a new
> session id, I would greatly appreciate it.
Would it help if you opened the window at another domain?
I don't use sessions, as I much prefer http authentication/stateless
pages etc. But I get the same problem i.e. admin user has to
keep logging in between accounts. The solution is just to change
the realm/domain for the admin user e.g. admin.mysite.com. Then
the browser keeps separate login/passwords.
This should also be possible with cookie based sessions since the
browsers will hold separate cookies for different domains and
also for different paths if you specify a path on the cookie setting.
I don't know if all this session stuff lets you specify the path
on the session cookie, but certainly the separate domain technique
Hope that helps,
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php