I had to create a new account because the password reset function on this site doesn't work, I could never get a reset email, tried it like 10 times. Buy anyway...
Yeah, I typed the code wrong it's written the way you said it should be but I still get the errors. As for the html part here it is.
if(isset($_POST['submit'])){
foreach($_POST['quantity'] as $key => $val) {
if($val==0) {
unset($_SESSION['cart'][$key]);
}else{
$_SESSION['cart'][$key]['quantity']=$val;
}
}var_dump($_POST['quantity']); // I tried the suggestion Notion Commotion mentioned and I got this: string '2' (length=1)
}
<td><?php echo $row['item']?></td>
<td><input type="text" name="quantity"[<?php echo $row['menu_id']?>]" size="5" value="<?php echo $_SESSION['cart'][$row['menu_id']]['quantity']?>"/></td>
<td><?php echo "$". $row['price']?></td>
<td><?php echo $_SESSION['cart'][$row['menu_id']]['quantity']*$row['price']?></td>