<?php
session_start();
header('Content-Type: application/json');
include '../config/database.php';
$db = new Database(); $conn = $db->getConnection();
$conn->prepare("DELETE FROM inventaris WHERE id=?")->execute([$_POST['id']]);
echo json_encode(['status'=>'success','message'=>'Data inventaris dihapus']);
?>