<?php
    require_once "./process.php";
    require_once './header.php';

$hd = $_POST['hd'];
$bd = $_POST['bdy'];
$tm = $_POST['tm'];
$dt = $_POST['dt'];
$id = $_POST['id'];

$sql = "UPDATE arrival SET heading='$hd', body='$bd',time='$tm',date='$dt' WHERE id='$id'";
$result = $conn->query($sql);
if($result) {
    echo json_encode(["success" => true]);
}else {
    echo json_encode(["failed" => 500]);
}

?>

