fetch_assoc(); $order_items = mysqli_query($conn, "SELECT * FROM order_item WHERE order_id={$_GET['order_id']};"); $total_price = 0; $products = []; foreach($order_items as $item) { $product_name = mysqli_query($conn, "SELECT name FROM products INNER JOIN order_item ON products.product_id = order_item.product_id WHERE order_item.id={$item['id']};")->fetch_assoc()['name']; $total_price = $total_price + ($item['quantity']*$item['price']); $products[] = ['Product Name' => $product_name, 'Quantity' => $item['quantity'], 'Price per unit' => $item['price'], 'Product ID' => $item['product_id']]; } ?> Order
Order Number
User ID
Order Date
Shipped Date
Arrived Date
Status
Address
City
Postal Code
Phone Number
Name
Surname
Price


$value) { ?>