Php: How to I get one session tied to all browser windows???
I've been making extensive use of sessions for the whole entire log-in and access management system of my website.
Upon successful login, I assign $_SESSION['userid'] = username.
If $_SESSION['userid'] is set, then the person has logged on.
Now the problem arises which I didn't foresee.
I can log-in as one user, open another browser window and log-in as another user. That's just ridiculously detrimental. Please help me. How do I tie one session to all the browser windows of the same machine?
Or do have absolutely have no hope and need to ditch sessions and use cookies?? Remember, I've already done the site. It's not easy to change it back. Please helpe me!!!
I've been making extensive use of sessions for the whole entire log-in and access management system of my website.
Upon successful login, I assign $_SESSION['userid'] = username.
If $_SESSION['userid'] is set, then the person has logged on.
Now the problem arises which I didn't foresee.
I can log-in as one user, open another browser window and log-in as another user. That's just ridiculously detrimental. Please help me. How do I tie one session to all the browser windows of the same machine?
Or do have absolutely have no hope and need to ditch sessions and use cookies?? Remember, I've already done the site. It's not easy to change it back. Please helpe me!!!
Comment