$status, "message" => $error, "data" => null ]); } else { session_start(); $_SESSION['alert'] = [ 'code' => $status, 'reason' => $error ]; header("Location: $path"); } } function display_alert() { if (!isset($_SESSION["alert"])) { return; } $alert = $_SESSION["alert"]; unset($_SESSION["alert"]); $status = $alert["code"]; $reason = str_safe($alert["reason"], 100); $ok = substr($status, 0, 1) == '2'; echo '' ?>
= $reason ?>