softDelete(); if(!$success) throw new Exception("Failed to delete account. Please try again later."); Core::addAlert("success", "Account deleted successfully."); unset($_SESSION["user_id"]); HTTP::redirect("/register"); } catch(Exception $e) { Core::addAlert("danger", $e->getMessage()); } } View::includeOnce("header", compact("page_title")); View::include("account_delete"); View::includeOnce("footer"); ?>