Deleting multiple records with check box selection

pamelaluck

New Member
I am trying to allow a delete button to remove and delete from the db records that have the check boxed checked. I have tried alot of different ways and no luck. Here is my code


The select all works fine no need to touch that but once i choose what i want deleted via checking the boxes and pressing delete nothing works when trying to delete them. If anyone can help thanks

Code:
Select all
<form action="mailbox.php" method="post">
<table width="90%" align="center">
<tr><td bgcolor="#33CCFF"><input type="checkbox" name="checkall2" onclick="checkUncheckAll(this);"/>
Select All | <input name="delete" type="submit" value="Delete"></td>
</tr></table>

<table width="90%" align="center">
<tr>
<td width="5%">
<tr>
<td align="left">&nbsp;</td>
<td width="1%"></td>
<td width="28%" align="left">Email</td>
 

jonweb2009

New Member
I donot know how it is in PHP,

but in classic ASP, i iterate through the forms collection submited by the form button.

and delete the record one by one

should be similar in php
 

uptownhr

New Member
Add [] to the name variable in your html and add the ID that is associated to that checkbox. Once posted to the server, you can look through this array and filter out the checked items.
 
Top