0

Please advice once the session is created by A client and B client logs in with the same username and password I want to logout A client
Is this possible?

<?php
	//Start session
	session_start();
	
	//Check whether the session variable SESS_MEMBER_ID is present or not
	if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
		header("location: access-denied.php");
		exit();
	}
?>

Edited by j_limboo: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by j_limboo
0

Sessions data is stored on the server, it got nothing to do in case some client logs in and then some other and then again some other.
be clear exactly what you want to achieve, i think just the user loging verify, if thats it only checking the if(isset($_session ) ) will do the same thing.
I cant find the need to use || (trim($_SESSION) == '')

0

I was looking for 1 user account, 1 login. If the owner of the user shares the account still 1 should login at anytime.
There should be no chance two client logging in with the same username at the same time

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.