Initial commit

This commit is contained in:
Farha
2026-04-07 17:17:55 +07:00
commit 433efc4457
11 changed files with 1600 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
header('Content-Type: application/json');
include 'db_config.php';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$id = $_POST['id'];
$stmt = $conn->prepare("DELETE FROM locations WHERE id = ?");
$stmt->bind_param("i", $id);
if ($stmt->execute()) {
echo json_encode(['status' => 'success', 'message' => 'Data dihapus']);
} else {
echo json_encode(['status' => 'error', 'message' => $stmt->error]);
}
$stmt->close();
}
$conn->close();
?>