Morning people,

I have a form with checkbox values, if checked  an array of id's are passed
to a deletion script.

I can get the array and implode to a string. 
Can anyone tell me how to delete all the messages in the DB that have the
checked value.

Presently the script is deleting only the last id value that has been
checked.

---snip-----

First the form:

        <input type=\"checkbox\" name=\"delete_list[]\" value=\"$id\">

submit etc....

Then the deletion script:

        <?php

        $delete=implode(",", $delete_list);

        if(!($result = mysql_db_query($DB, "DELETE FROM SENT_ITEMS WHERE ID
= '$delete'")))
                {
                DisplayErrMsg(sprintf("internal error %d:%s\n",
                mysql_errno(), mysql_error()));
                mysql_close($link);
                exit();
                }
?>


Been messing about with this one for a while now and I am getting a bit
flustered!

Thx in advance,

Karl


==========================
Karl Phillipson
PHP SQL Programmer

Saffron Hill Ventures
67 Clerkenwell Road
London   
EC1R 5BL

Saffron Hill: 0207 693 8300
Direct Line: 0207 693 8318

Reply via email to