<?php
require_once dirname(__DIR__) . '/auth_check.php';
require_once dirname(__DIR__) . '/config.php';

$id = isset($_POST['id']) ? (int)$_POST['id'] : 0;
if ($id <= 0) { echo "error: Invalid ID"; die(); }

if (mysqli_query($koneksi, "DELETE FROM price WHERE id=$id")) {
    echo "success";
} else {
    echo "error: " . mysqli_error($koneksi);
}
