$_SESSION['logged'] = array(); $_SESSION['logged']['Vasya'] = true; $_SESSION['logged']['Petya'] = true; ... if (isset($_SESSION['logged'][$login]))