<input type = "checkbox" name = "cbox[<?= $row[xxx]; ?>]" value = "yes"> replace "xxx" with the row number for your id field
when it gets to php, the index of $cbox will be the id from the database, just use: foreach ($cbox as $id=>$dummy) to loop through the array HTH Martin -----Original Message----- From: Brian & Shannon Windsor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:00 PM To: [EMAIL PROTECTED] Subject: [PHP] passing checkbox info I'm trying to use checkboxes to be able to delete information from my database. It's just not working right. I can't get the checkbox form to pass a variable that makes any sense to me, and I looked into the check box function, and it made less sense. The value passed back from the check boxes are always "yes", but there is nothing to tell which box passed it back. Maybe I don't know enough about the check boxes in general. Any help is appreciated. I'm displaying the checkboxes as I display the data from the database. Can I tie in the checkboxes to one of the fields that i could then use to delete that entry? Thanks, Brian while ($row = mysql_fetch_row($result)) { echo "<tr align=left>\n"; { ?> <td> <input type = "checkbox" name = "cbox[]" value = "yes"> <?php echo "<td>"; echo "<a href='$row[0]'><img src='$row[0]' width='80' height='50' border='0'>"; echo "<td>"; echo $row[1]; echo "<td>"; echo $row[2]; echo "<td>"; echo $row[3]; echo "<td>"; echo $row[4]; echo "<td>"; echo $row[5]; echo "<td>"; echo $row[6]; echo "<td>"; echo $row[7]; echo "<td>"; echo $row[8]; echo "</td>\n"; } echo "</tr>\n"; } echo "</table>"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php