Fixed Web Pages "Add Page" form that silently failed after clicking "Yes, Add It!" with no feedback. Root cause: add.parentmenu.php blindly inserted ALL POST fields into DB, causing 3 cascading SQL errors: (1) Unknown column _token — CSRF field not excluded from INSERT; (2) Incorrect integer value for IncludeFileID — empty string sent for INT column; (3) Field pmid/meta_tags/securitylevel have no default — NOT NULL columns missing from INSERT. Fix: whitelist only valid DB columns, skip empty INT fields, add required defaults (pmid=0, meta_tags/securitylevel=empty), fallback siteid from POST when session missing. Also improved JS: changed closeOnConfirm to false for proper dialog flow, added console.log debug traces at every stage, added server error feedback via swal when response is unexpected. Verified end-to-end: form submit → SweetAlert confirm → AJAX 200 → tree refresh → success dialog.