$tipo = $_SESSION['tipo']; if($tipo != "admin"){ header("Location: dashboard"); exit(); }