I noticed that Message-ID:
<3a1d1813.0403181009.3d7bb1b9@posting.google.com > from LRW contained the
following:
[color=blue]
>while ($row = mysql_fetch_array($result)) {
> echo "<tr ".$bgcolour."><td><input name=\"del\"
>type=\"checkbox\" value=\"$iid\"></td><td>" . $quantity . "</td><td>"
>. $typename . "</td><td>" . $typesize . "</td><td>$" . $amount .
>"</td><td></td><td></td><td>$".round(($amount*$taxmult),2)."</td></tr>";
>
>The $iid is the table.id mentioned in the SELECT statment before this.
>So that each checkbox, when checked, will have a value of that row's
>ID.[/color]
The way I did this as to sequentially name the check boxes e.g.
$i=0;
while ($row = mysql_fetch_array($result)) {
echo "<tr ".$bgcolour."><td><input name=\"del$i\"
type=\"checkbox\" value=\"$iid\"></td><td>" . $quantity . "</td><td>"
.. $typename . "</td><td>" . $typesize . "</td><td>$" . $amount .
"</td><td></td><td></td><td>$".round(($amount*$taxmult),2)."</td></tr>";
$i++;
}
You know how many check boxes you have printed. When the form is
returned, do a loop to see which boxes are ticked.
for($i=0;$i<$number_of_boxes; $i++){
if(isset($_POST["del$i"])){
//do delete stuff
}
}
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs
http://www.ckdog.co.uk/rfdmaker/