'error', 'message' => 'ID tidak valid']); $conn->close(); exit; } $stmt = $conn->prepare("DELETE FROM rumah_ibadah WHERE id = ?"); $stmt->bind_param("i", $id); if ($stmt->execute()) { echo json_encode(['status' => 'success', 'message' => 'Rumah ibadah berhasil dihapus']); } else { echo json_encode(['status' => 'error', 'message' => $stmt->error]); } $stmt->close(); } $conn->close(); ?>