Nathan
Nathan

Reputation: 7709

How to delete/invalidate a php session different to the current one

I want to prevent my user to login my website from multiple browsers simultaneously. The server backend is written in php. The Idea is that I invalidate any session for that user when he logs in again.

To know which session the user has last logged in, I store the session id in a mysql database (as a VARCHAR).

But how can I invalidate a session different to the current one in php?

Upvotes: 0

Views: 195

Answers (1)

Deepak Dholiyan
Deepak Dholiyan

Reputation: 1912

Please check some good answer already provided on the below URls

How to prevent multiple logins in PHP website

How to prevent multiple user login with same user name and password?

Upvotes: 1

Related Questions