<?php
require_once('includes/load.php');
if (isset($_POST['id'])) {
    $id = $db->escape($_POST['id']);
    $scan_in = $db->escape($_POST['scan_in']);
    $scan_status = $db->escape($_POST['scan_status']);
    
    $query = "UPDATE checklist_awb SET scan_in='{$scan_in}', scan_status='{$scan_status}' WHERE id='{$id}'";
    if ($db->query($query)) {
        echo json_encode(['status' => 'success']);
    } else {
        echo json_encode(['status' => 'error']);
    }
}
?>
