and assertLoggedIn() : function assertLoggedIn() { global $TOP; global $FY_UserID; if( ! isset( $_SESSION ) ) { session_start(); } $FY_UserID = $_SESSION['FY_UserID']; if ( $FY_UserID == "" ) { header("Location:../Login/login.phtml" ); exit(2); } ... and then some code to log which users logs in }