I have several websites in one domain (virtual host):
website.com/site1
, website.com/site2
etc.
On each site there is a authentification, which saves the username
in Session
.
The problem is:
If I'm on site1
, and, let's say, Alex accecced to site2
from my browser, site1 would think that I'm Alex. And if I do something, Alex will be written in the DB.
One solution, is to check whether the Session
and the username
is the same on each action.
Is there a solution to set different $_SESSION['name']
for site1
and site2
, using the same $_SESSION['name']
variable?