Upload files to "/"
This commit is contained in:
+10
-4
@@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$conn = new mysqli("localhost","root","","gis_spbu");
|
require_once 'koneksi.php';
|
||||||
$conn->query("INSERT INTO jalan (nama,status,panjang,geom)
|
$nama = $_POST['nama'] ?? '';
|
||||||
VALUES ('$_POST[nama]','$_POST[status]','$_POST[panjang]','$_POST[geom]')");
|
$status = $_POST['status'] ?? 'Kabupaten';
|
||||||
?>
|
$panjang = $_POST['panjang'] ?? 0;
|
||||||
|
$geom = $_POST['geom'] ?? '[]';
|
||||||
|
$stmt = $conn->prepare("INSERT INTO jalan (nama, status, panjang, geom) VALUES (?, ?, ?, ?)");
|
||||||
|
$stmt->bind_param('ssds', $nama, $status, $panjang, $geom);
|
||||||
|
$stmt->execute();
|
||||||
|
echo json_encode(['status' => 'success']);
|
||||||
|
?>
|
||||||
|
|||||||
+10
-4
@@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$conn = new mysqli("localhost","root","","gis_spbu");
|
require_once 'koneksi.php';
|
||||||
$conn->query("INSERT INTO kavling (pemilik,status,luas,geom)
|
$pemilik = $_POST['pemilik'] ?? '';
|
||||||
VALUES ('$_POST[pemilik]','$_POST[status]','$_POST[luas]','$_POST[geom]')");
|
$status = $_POST['status'] ?? 'SHM';
|
||||||
?>
|
$luas = $_POST['luas'] ?? 0;
|
||||||
|
$geom = $_POST['geom'] ?? '[]';
|
||||||
|
$stmt = $conn->prepare("INSERT INTO kavling (pemilik, status, luas, geom) VALUES (?, ?, ?, ?)");
|
||||||
|
$stmt->bind_param('ssds', $pemilik, $status, $luas, $geom);
|
||||||
|
$stmt->execute();
|
||||||
|
echo json_encode(['status' => 'success']);
|
||||||
|
?>
|
||||||
|
|||||||
+10
-13
@@ -1,14 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$conn = new mysqli("localhost", "root", "", "gis_spbu");
|
require_once 'koneksi.php';
|
||||||
|
$id = (int)($_POST['id'] ?? 0);
|
||||||
$id = $_POST['id'];
|
$nama = $_POST['nama'] ?? '';
|
||||||
$nama = $_POST['nama'];
|
$wa = $_POST['wa'] ?? '';
|
||||||
$wa = $_POST['wa'];
|
$buka = $_POST['buka'] ?? 'Tidak';
|
||||||
$buka = $_POST['buka'];
|
$stmt = $conn->prepare("UPDATE spbu SET nama=?, wa=?, buka=? WHERE id=?");
|
||||||
|
$stmt->bind_param('sssi', $nama, $wa, $buka, $id);
|
||||||
$conn->query("UPDATE spbu SET
|
$stmt->execute();
|
||||||
nama='$nama',
|
echo json_encode(['status' => 'success']);
|
||||||
wa='$wa',
|
?>
|
||||||
buka='$buka'
|
|
||||||
WHERE id='$id'");
|
|
||||||
?>
|
|
||||||
|
|||||||
+9
-3
@@ -1,4 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$conn=new mysqli("localhost","root","","gis_spbu");
|
require_once 'koneksi.php';
|
||||||
$conn->query("UPDATE jalan SET nama='$_POST[nama]',status='$_POST[status]' WHERE id=$_POST[id]");
|
$id = (int)($_POST['id'] ?? 0);
|
||||||
?>
|
$nama = $_POST['nama'] ?? '';
|
||||||
|
$status = $_POST['status'] ?? 'Kabupaten';
|
||||||
|
$stmt = $conn->prepare("UPDATE jalan SET nama=?, status=? WHERE id=?");
|
||||||
|
$stmt->bind_param('ssi', $nama, $status, $id);
|
||||||
|
$stmt->execute();
|
||||||
|
echo json_encode(['status' => 'success']);
|
||||||
|
?>
|
||||||
|
|||||||
+9
-3
@@ -1,4 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
$conn=new mysqli("localhost","root","","gis_spbu");
|
require_once 'koneksi.php';
|
||||||
$conn->query("UPDATE kavling SET pemilik='$_POST[pemilik]',status='$_POST[status]' WHERE id=$_POST[id]");
|
$id = (int)($_POST['id'] ?? 0);
|
||||||
?>
|
$pemilik = $_POST['pemilik'] ?? '';
|
||||||
|
$status = $_POST['status'] ?? 'SHM';
|
||||||
|
$stmt = $conn->prepare("UPDATE kavling SET pemilik=?, status=? WHERE id=?");
|
||||||
|
$stmt->bind_param('ssi', $pemilik, $status, $id);
|
||||||
|
$stmt->execute();
|
||||||
|
echo json_encode(['status' => 'success']);
|
||||||
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user