0
So I add the product:
if (isset($_GET['acao'])) {
if ($_GET['acao'] == 'add') {
$id = intval($_GET['id']);
if (!empty($_SESSION['shop'][$id]))
//if (!isset($_SESSION['shop'][$id]))
$_SESSION['shop'][$id] = 1;
} else {
$_SESSION['shop'][$id] += 1;
} e aqui o input : echo'<td><input rel="'.$linha['id'].'" type="number" step="1" min="1" style="width:50px; font-family: Tahoma; font-size: 20px;" name="prod[' . $id . ']" value="' . $qtd . '"></td>';
I wonder how I can keep up the amount after a refresh. For example: if I choose 2 products, when refreshing the page, returns the quantity of 1 product.