first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// php/delete_anggota.php
|
||||
require_once 'koneksi.php';
|
||||
header('Content-Type: text/plain');
|
||||
|
||||
$id = intval($_POST['id'] ?? 0);
|
||||
if (!$id) { http_response_code(400); echo 'ID tidak valid.'; exit; }
|
||||
|
||||
$stmt = $conn->prepare("DELETE FROM anggota_keluarga WHERE id=?");
|
||||
$stmt->bind_param('i', $id);
|
||||
if ($stmt->execute()) { echo 'success'; }
|
||||
else { http_response_code(500); echo 'Gagal: ' . $stmt->error; }
|
||||
$stmt->close();
|
||||
?>
|
||||
Reference in New Issue
Block a user