I'm using the code from this tutorial: http://www.phpwebcommerce.com/Everything is working fine, except for one thing. Updating the contents from the shopping cart doesn't work (that is, when changing the quantity of items).I don't know what i am missing, the live demo in the previously mentioned web page is working properly.this is my code:\[code\]<?php$subTotal = 0;for ($i = 0; $i < $numItem; $i++) {extract($cartContent[$i]);$productUrl = "index.php?c=$cat_id&p=$pd_id";$subTotal += $pd_price * $ct_qty;?><tr class="content"> <td width="80" align="center"><a href="http://stackoverflow.com/questions/13716079/<?php echo $productUrl; ?>"><img src="http://stackoverflow.com/questions/13716079/<?php echo $pd_thumbnail; ?>" border="0"></a></td> <td><a href="http://stackoverflow.com/questions/13716079/<?php echo $productUrl; ?>"><?php echo $pd_name; ?></a></td> <td align="right"><?php echo displayAmount($pd_price); ?></td><td width="75"><input name="txtQty" type="text" id="txtQty" size="5" value="http://stackoverflow.com/questions/13716079/<?php echo $ct_qty; ?>" class="box" onKeyUp="checkNumber(this);"><input name="hidCartId" type="hidden" value="http://stackoverflow.com/questions/13716079/<?php echo $ct_id; ?>"><input name="hidProductId" type="hidden" value="http://stackoverflow.com/questions/13716079/<?php echo $pd_id; ?>"></td><td align="right"><?php echo displayAmount($pd_price * $ct_qty); ?></td><td width="75" align="center"> <input name="btnDelete" type="button" id="btnDelete" value="http://stackoverflow.com/questions/13716079/Borrar" onClick="window.location.href='http://stackoverflow.com/questions/13716079/<?php echo $_SERVER['PHP_SELF'] . "?action=delete&cid=$ct_id"; ?>';" class="box"> </td></tr><?php function updateCart() {$cartId = $_POST['hidCartId'];$productId = $_POST['hidProductId'];$itemQty = $_POST['txtQty'];$numItem = count($itemQty);$numDeleted = 0;$notice = '';for ($i = 0; $i < $numItem; $i++) {echo displayAmount($itemQty ); $newQty = (int)$itemQty[$i]; if ($newQty < 1) { // remove this item from shopping cart deleteFromCart($cartId[$i]); $numDeleted += 1; } else { // check current stock $sql = "SELECT pd_name, pd_qty FROM tbl_product WHERE pd_id = {$productId[$i]}"; $result = dbQuery($sql); $row = dbFetchAssoc($result); if ($newQty > $row['pd_qty']) { // we only have this much in stock $newQty = $row['pd_qty']; // if the customer put more than // we have in stock, give a notice if ($row['pd_qty'] > 0) { setError('La cantidad que eligio sobrepasa de lo que se encuentra disponible. El numero disponible esta indicado "Cantidad" caja. '); } else { // the product is no longer in stock setError('Lo sentimos, pero el producto elegido (' . $itemQty . ') ya no se encuentra disponible'); // remove this item from shopping cart deleteFromCart($cartId[$i]); $numDeleted += 1; } } // update product quantity $sql = "UPDATE tbl_cart SET ct_qty = $newQty WHERE ct_id = {$cartId[$i]}"; dbQuery($sql); }}\[/code\]