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:[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 1:36 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to