Personally what you should do is when a user comes to your site, and goes to login you grab their login information and write your logic to determine which site they need to be at redirect them to that site and log them in automatically.
This prevents you from logging people on and off.
Your psedocode is something like this:
User Logs in
Grab Data from the database (ID)
If id = n redirect to site else
elseif id = n2 redirect to site b
Pass ID along with redirect
Once at site A or B have the ID go to the database grab the necessary information
Update cookie
Essentially this is all transparent to the user.
hth
--Stole this from a moderator
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
|