Re: build an array of checkbox

From: Date: Fri, 18 Mar 2005 18:09:50 +0000
Subject: Re: build an array of checkbox
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211062@lists.php.net to get a copy of this message
Hello Tomás, Friday, March 18, 2005, 1:31:40 PM, you wrote: T> I have a doubt, I want to build an array of checkbox, why? well T> because I list a recordset from data base, and I want to delete the T> current record when the check is selected by the click mouse. for T> example the editor of mail.yahoo.xx, that you can delete any mail T> when you selected any checkbox. <input type="checkbox" name="delete[]" value="<?php echo $r['id']; ?>" /> delete becomes your array i.e. print_r($_POST['delete']); $r['id'] is the record id from the DB. Then do a foreach through the delete array and delete out records where id = the "as" variable used in the foreach. -- Leif (TB lists moderator and fellow end user). Using The Bat! 3.0.9.7 Return (pre-beta) under Windows XP 5.1 Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

« previous php.general (#211062) next »