RE: [PHP] php and checkboxes.
| From: | Angelo Zanetti | Date: | Mon, 29 Sep 2003 11:43:08 +0000 |
| Subject: | RE: [PHP] php and checkboxes. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164219@lists.php.net to get a copy of this message | ||
Hi Marek,
I dont actually want to delete the record from the database, perhaps I wasnt
very clear in my explanation, but I just need to remove that entry from the
table.
kinda like when deleting mail from your web email account like hotmail.
-----Original Message-----
From: Marek Kilimajer [mailto:kilimajer@webglobe.sk]
Sent: Monday, September 29, 2003 1:36 PM
To: angelo@zlogic.co.za
Cc: Php-General@Lists.Php.Net
Subject: Re: [PHP] php and checkboxes.
Simple:
foreach($_POST['del_checkboxes'] as $id) {
$sql="delete from table where id='$id'";
}
Checkboxes are created using
<input .... name="del_checkboxes" value="<?= $id ?>">
Angelo Zanetti wrote:
> Hi all
>
> I have a table that is populated from a database which gets the IDs of the
> records from a php array.Every row in the table has a checkbox next to the
> actual record, what I want to do is to allow the user to select the
records
> they want to remove by clicking the checkbox(es) and then click a button
to
> submit the form.
>
> so how do I remove these records? do I:
>
> -do I do an array_diff and then just select the records that are
remaining?
>
> this to me seems the most logical.
>
> tia
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php