first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
session_start();
|
||||
$role = isset($_SESSION['role']) ? $_SESSION['role'] : '';
|
||||
if ($role !== 'infrastruktur') { echo "unauthorized"; exit; }
|
||||
|
||||
include "koneksi.php";
|
||||
|
||||
$id = intval($_POST['id']);
|
||||
$lat = doubleval($_POST['lat']);
|
||||
$lng = doubleval($_POST['lng']);
|
||||
|
||||
$conn->query("UPDATE tb_spbu SET latitude='$lat', longitude='$lng' WHERE id='$id'");
|
||||
?>
|
||||
Reference in New Issue
Block a user