On 12-Sep-2001 Christopher William Wesley wrote:
> On Tue, 11 Sep 2001, Ryan Stephens wrote:
> 
>> Im trying to output a list of options, each with a checkbox named "ChkBox"
> ...
> 
> Name each checkbox "ChkBox[]" ... the brackets are the key.
> 
> When the form is submitted, you'll have an array called $ChkBox that will
> contain the data only from the checked checkboxes.  You can loop over that
> array pretty simply.
> 
> for( $i = 0; $i < sizeof( $ChkBox ); $i++ ){
>       print( $ChkBox[$i] . " was checked<br>" );
>       // Delete the row from the database, etc ...
> }
> 

            $p=array();
            while (list($k,$v) = each($cbk)) {
                $p[]=$k;
            }
            $ids=implode("','", $p);
            $qry="DELETE FROM foo WHERE id IN ('$ids')";
            mysql_query($qry);
>

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to