prepare( "INSERT INTO shipments (shipper_name, shipper_company, origin_city, destination_city, cargo_description, weight_tons, pickup_date, delivery_date, payment_method) VALUES (:shipper_name, :shipper_company, :origin_city, :destination_city, :cargo_description, :weight_tons, :pickup_date, :delivery_date, :payment_method)" ); $stmt->execute([ ':shipper_name' => $shipperName, ':shipper_company' => $shipperCompany, ':origin_city' => $origin, ':destination_city' => $destination, ':cargo_description' => $cargo, ':weight_tons' => $weight, ':pickup_date' => $pickupDate, ':delivery_date' => $deliveryDate, ':payment_method' => $payment, ]); $_SESSION['shipper_name'] = $shipperName; set_flash('success', t('success_shipment')); header('Location: ' . url_with_lang('shipper_dashboard.php')); exit; } } $shipments = []; try { $stmt = db()->query("SELECT * FROM shipments ORDER BY created_at DESC LIMIT 20"); $shipments = $stmt->fetchAll(); } catch (Throwable $e) { $shipments = []; } render_header(t('shipper_dashboard'), 'shipper'); $flash = get_flash(); ?>

total