I have jquery onclick triger that pass:
var product = id;
var name = name;
$.post("./shop/basket.php", {"product": product,"name": name});
to basket.php where I store:
$_SESSION['product'] = $_POST['product'].'-'.$_POST['name'];
But each time a new click is generated it rewrites the S_SESSION
instead of adding it as new $_SESSION
.
How to store all values in $_SESSION['product']
so I can loop it later and extract each $_SESSION['product']
?
Thank you in advance