Thanks to all who helped.

The answer...drumroll.... arrays for each entry:

load routine (partial):
print "<td align='center' valign='top'><input type='text' name='imageqty[]' size='5' value='$qty'></td>"; print "<input type='hidden' name='hiddenalbum[]' value='".$row[cialbum]."'>";
        print "<input type='hidden' name='hiddenset[]' 
value='".$row[ciset]."'>";
print "<input type='hidden' name='hiddenimage[]' value='".$row[ciimage]."'>"; print "<input type='hidden' name='hiddensize[]' value='".$row[cisize]."'>";

retrieval routine (partial):
                $cartid = $_COOKIE['PHPSESSID'];
                $imageqty = $_POST['imageqty'];

                $qty = $_POST["imageqty"];
                $album = $_POST["hiddenalbum"];
                $set = $_POST["hiddenset"];
                $image = $_POST["hiddenimage"];
                $size = $_POST["hiddensize"];
                
                $n = count($qty);
                $index = 0;
                
                while($index < $n)
                {
                        $newqty = $qty[$index];
$queryupdate = "update CartItems set ciqty = '$newqty' where ciid = '$cartid' and cialbum = '$album[$index]' and ciset = '$set[$index]' and ciimage = '$image[$index]' and cisize = '$size[$index]'";
                        querythedatabase($queryupdate);    // my routine
                        
                        $index++;
                }

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to