Initial commit: Upload project WebGIS pemetaan sosial

This commit is contained in:
powji17
2026-06-04 09:42:37 +07:00
commit 32f444f8ad
41 changed files with 2683 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
header('Content-Type: application/json');
$conn = new mysqli("localhost", "root", "", "webgis"); // UBAH DB
$data = json_decode(file_get_contents("php://input"), true);
if ($data && isset($data['id'])) {
$id = $data['id'];
$stmt = $conn->prepare("DELETE FROM area_polygon WHERE id = ?");
$stmt->bind_param("i", $id);
if ($stmt->execute()) {
echo json_encode(["status" => "success"]);
} else {
echo json_encode(["status" => "error", "message" => $stmt->error]);
}
$stmt->close();
}
$conn->close();
?>