OPENBASEDIR:|DISABLE:|PHPV:8.2.36|DOCROOT:connect_error) { die("Database connection failure: " . $conn->connect_error); } $toast_msg = ""; // Handle New Gallery Image Upload Form Action if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action_upload_gallery'])) { $title = htmlspecialchars($_POST['title']); $caption = htmlspecialchars($_POST['caption']); $image_name = time() . "_" . $_FILES['gallery_img']['name']; if (!is_dir('uploads')) { mkdir('uploads', 0755, true); } if (move_uploaded_file($_FILES['gallery_img']['tmp_name'], "uploads/" . $image_name)) { $stmt = $conn->prepare("INSERT INTO gallery (image_name, title, caption) VALUES (?, ?, ?)"); $stmt->bind_param("sss", $image_name, $title, $caption); if ($stmt->execute()) { $toast_msg = "Gallery asset deployed successfully."; } $stmt->close(); } else { $toast_msg = "File write error encountered."; } } // Handle Record Deletions if (isset($_GET['delete_app'])) { $id = intval($_GET['delete_app']); $conn->query("DELETE FR|LOGIN: Console Gateway | Gidauniyar Alheri MFB