okay, here's the dealybob.............
I have a list of products that a user has selected out of a list on a previous page.
On the page in question, I have the name of the product and a "quantity" box where they update the quantity for each product.
My problem lies on the next page where I try to update the quantity for "each" product.
here is my statement so far:
<?
$tems = $HTTP_POST_VARS["quantity"];
$items2 = $HTTP_POST_VARS["prodid"];
for($i = 0; $i < count($items); $i++) {
$userid = $userid;
$sql = "UPDATE orders SET " .
"quantity='$items[$i]' " .
"where prodid='$prodid' and userid='$userid'";
#echo($sql);
$result = @($sql, $dbconn);
if (!$result) {
echo("query error: " . mysql_error() . "<br><br>$result");
exit();
}
}
?>
here is the sql statement that gets echo'd when I submit:
UPDATE orders SET quantity='2' where prodid='Array' and userid='Jason Stanley16:01,30thOctober 2002'UPDATE orders SET quantity='3' where prodid='Array' and userid='Jason Stanley16:01,30thOctober 2002'UPDATE orders SET quantity='1' where prodid='Array' and userid='Jason Stanley16:01,30thOctober 2002'
as you can see from the data above, the "quantity" is actually coming through, but I need to be able to update the quantity for each product.
any help?????.............Please????????
Thanks so much