Two application using the same session variables
Posted: Wed Apr 19, 2006 3:40 pm
I have two totally different applications. They are all using session variables to authenticate users. When a user visit these two applications at the same time, if he logs out in one application, he will also be logged out automatically for the other one. Since the application's logout php script is:
session_start();
session_destroy();
$_SESSION=array();
So, logging out in one application will actually destory all the session variable. Also, if they both authenticate a user based on checking session variable session['username'], when you login in one application, you actually logged in both.
How can I make this work?
session_start();
session_destroy();
$_SESSION=array();
So, logging out in one application will actually destory all the session variable. Also, if they both authenticate a user based on checking session variable session['username'], when you login in one application, you actually logged in both.
How can I make this work?