prepare("SELECT * FROM orders WHERE id = ? AND client_id = ?"); $stmt->execute([$order_id, $_SESSION['client_id']]); $order = $stmt->fetch(PDO::FETCH_ASSOC); if (!$order) { header('Location: orders.php'); exit; } // Fetch order items $stmt = $db->prepare(" SELECT oi.*, p.name as product_name FROM order_items oi JOIN products p ON oi.product_id = p.id WHERE oi.order_id = ? "); $stmt->execute([$order_id]); $order_items = $stmt->fetchAll(PDO::FETCH_ASSOC); $page_title = t('order_confirmation'); require_once __DIR__ . '/includes/html_head.php'; require_once __DIR__ . '/includes/header.php'; ?>

#


.