error_reporting(E_ALL | E_NOTICE);
ini_set(‘display_errors’, ‘1’);
Hello every1 im new to all of this so bare with me for any mistakes. :-).
I have an issue with getting my foreach ($_SESSION………. to output what the customer have ordered from the order page, so that when they go to the cash register, i would like to have the page show what they have ordered, before they just send the order, my code is this——–
<?php
if (isset ($_SESSION[‘basket]) && count($
$sql = “SELECT * FROM order_product WHERE fk_order_ordre_id = ””;
$result = mysqli_query($connection, $sql) or die(mysqli_error($connection));
$ordre_id = mysqli_fetch_array($result);
echo “$order_id”;
foreach ($_SESSION[‘basket’] as $product_id => $product_amount){
$sql = “SELECT product_name, product_price FROM product WHERE fk_categori_id = ‘$order_id'”;
$result = mysqli_query($connection, $sql) or die(mysqli_error($connection));
[B]echo “I get this far, so just need to put something here for the output to work right??”;
}
?>
<?php
}
?>
i have tried almost everything from what i know and the web search results, but havent found a solution.
Best regards and thx in advance for any suggestions.
caramon