Good all the time of day, gentlemen.
Long ago, I made session authorization on my site. But looking at the site from the Internet, I see that I did not do everything to the end. Log in to the site, immediately go to another browser and log in from it. Next, restart the first browser and: you are not logged in or log in plz.
The meaning is clear and correct, when authorizing on another computer / in another browser - authorization in the first one should “fly”. Can anyone give an example of such an authorization by session (there are examples on the internet - I do not argue), but as described above when authorizing on another computer / in another browser - authorization on the first one “flew”, or first there was a transition that “under your login / pass "already someone is sitting, and then go to the login page.
I'm afraid to make a mistake with the code, you understand, authorization is a serious matter. And the FULL code, or the correct example from an Internet would be very useful. Help solve this problem. Thanks in advance.
up. Grateful for the examples below, but there was a problem:
Written above applied. How well - I do not know. Now, if someone has logged in, then on another computer / browser under this login / password it is impossible to log in anymore. What I did not want. I wanted an authorization in which only the last person logged in could work. Tell me where it was wrong or the code of the simplest authorization, where those who logged in NOT the last one, under one login / pass, are thrown away.