<? if(!$user OR $user['access'] < 1 OR $user['id'] != 1) { header('location: /'); exit; } //за место этого. if($user['id'] < 1) { header('location: /'); exit; }