$status, "message" => $error, "data" => null ]); } else { header("Location: $path" . (str_contains($path, "?") ? "&" : "?") . "error_status=$status&error_reason=$error"); } } function display_alert() { if (!isset($_GET["error_status"], $_GET["error_reason"])) { return; } $status = $_GET["error_status"]; $reason = str_safe($_GET["error_reason"], 100); $ok = substr($status, 0, 1) == '2'; echo '' ?>