Trying to update mySQL db with the following code but it will only update the last array each time.
Can you see a problem with the code?
foreach($array as $val)
{
$sql = " UPDATE cart SET
quantity='$val'
WHERE cartid = '$cartid' && productid = '$id'";
mysql_query($sql) or die("Cannot update the database.<br>" . mysql_error());
}
Thanks :-)
-Dizzy