Files
UAS_WEBGIS_AnderiSaputra_D1…/infrastruktur/update_spbu.php
T
Anderi Saputra adec71e763 first commit
2026-06-10 17:00:19 +07:00

13 lines
352 B
PHP

<?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'");
?>