Viewing File: /home/quiczmwg/public_html/admin/delete-deposit.php

<?php
include 'head.php';

// session_start();

if (isset($_GET['delete'])) {
    $delete_id = $_GET['delete'];
    
    // Use prepared statement to delete record
    $delete_query = $conn->prepare("DELETE FROM deposit WHERE id = ?");
    $delete_query->bind_param("i", $delete_id); // Bind the parameter
    $delete_query->execute(); // Execute the statement

    if ($delete_query) {
        header('location: deposit_confirmed.php');
        $_SESSION['message'] = 'Product has been deleted';
    } else {
        header('location: deposit_confirmed.php');
        $_SESSION['message'] = 'Product could not be deleted';
    }
}
?>
Back to Directory File Manager
<