first commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
include 'koneksi.php';
|
||||
|
||||
$id = $_POST['id'];
|
||||
$type = isset($_POST['type']) ? $_POST['type'] : 'spbu';
|
||||
|
||||
if ($type === 'spbu') {
|
||||
$lat = $_POST['latitude'];
|
||||
$lng = $_POST['longitude'];
|
||||
$query = "UPDATE spbu SET latitude='$lat', longitude='$lng' WHERE id='$id'";
|
||||
} elseif ($type === 'jalan') {
|
||||
$geom = $_POST['geom'];
|
||||
$panjang = $_POST['panjang'];
|
||||
$query = "UPDATE jalan SET geom='$geom', panjang='$panjang' WHERE id='$id'";
|
||||
} else {
|
||||
$geom = $_POST['geom'];
|
||||
$luas = $_POST['luas'];
|
||||
$query = "UPDATE parsil SET geom='$geom', luas='$luas' WHERE id='$id'";
|
||||
}
|
||||
|
||||
if(mysqli_query($conn, $query)){
|
||||
echo "success";
|
||||
}else{
|
||||
echo "error";
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user