<?php
session_start();
include '../config/database.php';
$db = new Database();
$conn = $db->getConnection();

$id = $_POST['id'];
$stmt = $conn->prepare("DELETE FROM pelayan WHERE id =?");
$stmt->execute([$id]);

header('Content-Type: application/json');
echo json_encode(['status' => 'success', 'message' => 'Data pelayan berhasil dihapus']);
?>