put it into a do while look, a good example is at http://devshed.com/Server_Side/PHP/DB_Basics/
Viral Shah wrote:
Hi!
I have the following piece of code within my form ...
<?php
$result = mysql_query("SELECT id, value FROM table", $db);
while ($myrow = mysql_fetch_row($result))
{
?>
<tr valign="middle">
<td>
<input type="checkbox" name="cbxDelete" value="<?php printf("%d", $myrow[0]); ?>">
</td>
<td>
<a href="<?php echo("$PHP_SELF?id=$myrow[0]"); ?>"><?php echo $myrow[1]; ?></a></td>
</tr>
<?php
}
?>
As you can see I am generating dynamically as many rows as returned from the database having a checkbox and a hypertext. The user can check some or all of the check boxes and submit the form (something similar to the inbox of HOTMAIL or YAHOO). I need to get ALL the rows that have the CHECKED property set for the check boxes when the user submits this form.
How do I do this?
Regards.
===
Viral Shah
viral@noeticsolutions.com