I suggest you do something like this:
Suppose user "A" first logs into "Com_1". Store the unique code in the database against this session and the same with the user session.
At the same time, if he (user "A") logs in to "com_2" again, check his status in the database and update the unique code in the database.
back again, if the same user (user "A") refreshes the page to "com_1", ββwe all you need to do is check the unique code from the session and match it with the database, it definitely wonβt, then log out and destroy the session.
To save the user in the log, even if the browser is closed, you can save the cookie in the browser and re-generate the session accordingly.
Hope this helps. Thank.
Chetan Sharma Jul 03 '10 at 7:17 2010-07-03 07:17
source share