<?php 
include 'includes/connect.php'; // DB connection

if(isset($_POST['id'])){
    $id = intval($_POST['id']);
    $query = "DELETE FROM inventory_management WHERE id=$id";
    if(mysqli_query($conn, $query)){
        echo "Inventory record deleted successfully";
    } else {
        echo "Error: ".mysqli_error($conn);
    }
} else {
    echo "Invalid request";
}
?>