<?php

header('Content-Type: application/json');

include '../config/koneksi.php';

$id           = $_POST['id'] ?? '';
$nama_jalan   = $_POST['nama_jalan'] ?? '';
$status_jalan = $_POST['status_jalan'] ?? '';

$query = mysqli_query(
    $conn,
    "UPDATE jalan
     SET
        nama_jalan = '$nama_jalan',
        status_jalan = '$status_jalan'
     WHERE id = '$id'"
);

echo json_encode([
    "success" => $query
]);