Hi,
I have created a simple shopping cart using session array, selected products are stored in the table. So far I have no problem!
I wish to remove (using x) individual product from the table/array, but I cannot access it.
Is anyone SESSION expert who can help?
Thanks in advance!
Printed table / session vector:
Art01 product_1 qte_1 price_1 image _1 x
Art02 product_2 qte_2 price_2 image _2 x
Art03 product_3 qte_3 price_3 image _3 x
My code:
$_SESSION["varukorg"][] = array(
"artikel" => $_SESSION,
"produkt" => $_SESSION,
"antal" => $_SESSION,
"pris" => $_SESSION,
"image_cart" => $_SESSION
);
foreach($_SESSION as $cart)
{
echo "<p>" . $cart . "</p>";
echo "<p>" . $cart . "</p>";
echo "<p>" . $cart . "</p>";
echo "<p>" . $cart . "</p>";
echo "<p><a href=#><img src=\"/images/produkter/ $cart \" width=100 height=100/></a></p>";
echo "<p><a href=#>delete</a></p>";
}