Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
include 'koneksi.php';
|
||||
|
||||
// ambil data JSON dari JS
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
|
||||
$id = $data['id'];
|
||||
$geom = json_encode($data['geom']);
|
||||
$type = $data['type'];
|
||||
|
||||
if ($type == 'jalan') {
|
||||
$conn->query("UPDATE jalan SET geom='$geom' WHERE id=$id");
|
||||
} elseif ($type == 'kavling') {
|
||||
$conn->query("UPDATE kavling SET geom='$geom' WHERE id=$id");
|
||||
}
|
||||
|
||||
echo "OK";
|
||||
?>
|
||||
Reference in New Issue
Block a user