prepare('SELECT * FROM shipments WHERE tracking=?');
$stmt->execute([$tracking]);
$s = $stmt->fetch(PDO::FETCH_ASSOC);
$logs = [];
if ($s) {
$stmt = $pdo->prepare('SELECT * FROM logs WHERE shipment_id=? ORDER BY log_date DESC');
$stmt->execute([$s['id']]);
$logs = $stmt->fetchAll(PDO::FETCH_ASSOC);
}
function status_class($st){
$map = ['Delivered'=>'s-delivered','In Transit'=>'s-intransit','On Hold'=>'s-onhold','Picked up'=>'s-picked'];
return $map[$st] ?? 's-picked';
}
?>
Tracking = h($tracking) ?>
Tracking number = h($tracking) ?> not found
Please check the tracking number and try again.
Tracking = h($s['tracking']) ?>
Shipment from = h($s['sender_name']) ?> to = h($s['consignee_name']) ?>
Weight: = h($s['weight']) ?> kg
Type: = h($s['shipment_type']) ?>
Shipped: = h($s['shipment_date']) ?>
Expected: = h($s['expected_delivery']) ?>
Contents
= h($s['contents']) ?>
Sender
= h($s['sender_name']) ?>
= nl2br(h($s['sender_address'])) ?>
Consignee
= h($s['consignee_name']) ?>
= nl2br(h($s['consignee_address'])) ?>
Need any help?
contact us!