CheckBoxes and Arrays

From: Date: Wed, 12 Sep 2001 00:48:03 +0000
Subject: CheckBoxes and Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-66975@lists.php.net to get a copy of this message
Im trying to output a list of options, each with a checkbox named "ChkBox" and with a value of the ID number from the database. This is no prob. The thing is, i want to be able to select some of those checkboxes (any number, in combination) and delete the information from the database that is associated with the ID for that CheckBox. Example of input tag: <----------------------------------> echo "<TD><Input Type=\"CheckBox\" Name=\"ChkBox\" Value=\"$row->ID\">\n"; <-----------------------------------> Now i thought that if i selected say items 1, 2, 3 from the list (and there IDs are 1, 2, 3) then When i submit the form a comma delimited string would be created (an array even.... not sure what it is). How would i loop through this list and break it apart so i can delete each record from the database that was selected. Ryan

« previous php.general (#66975) next »