CheckBoxes and Arrays

From: Date: Wed, 12 Sep 2001 07:39:00 +0000
Subject: CheckBoxes and Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-67008@lists.php.net to get a copy of this message
have you tried : <Input Type=\"CheckBox\" Name=\"ChkBox[]\" Value=\"$row->ID\"> -- (°- Nayco, //\ Nayco@netcourrier.com v_/_ http://nayco.free.fr Ryan Stephens <Ryan_Stephens@hotmail.com> a écrit dans le message : 20010912004702.31423.qmail@pb1.pair.com... > 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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#67008) next »