require ("path_to/global.php"); ... ... ... if ($bbuserinfo[userid] == 0) { // not logged in or un-registered } else { // registered and logged in }