check box +select all & delete
Posted: Mon Feb 21, 2005 8:07 pm
Hi,
I have setup a checkbox system where you can select all .. bu when you use the delete button .. nothing gets deleted?
here are parts of the code I guess are of relevance:
Hows does it reference to all the id's of the checked options ..?
I can delete a single record fine using the text "delete" option you can see in the loop above ..
Thanks
I have setup a checkbox system where you can select all .. bu when you use the delete button .. nothing gets deleted?
here are parts of the code I guess are of relevance:
Code: Select all
echo "<form name="form" method="post" action="../index.php?pages=pmparse&id=$id&cmd=deleterecord">
<table width="95%" border="0" cellspacing="1" cellpadding="5">
<tr>
<td bgcolor="#FEB341" width="7%"><div align="center"><font class="txt"><input type="submit" name="Submit" value="Delete"><input type="checkbox" value="on" name="allbox" onclick="checkAll();"/></font></div></td>
<td bgcolor="#FEB341" width="15%"><div align="center"><font class="txt">SENDER</font></div></td>
<td bgcolor="#FEB341" width="49%"><div align="center"><font class="txt">SUBJECT</font></div></td>
<td bgcolor="#FEB341" width="20%"><div align="center"><font class="txt">DATE</font></div></td>
<td bgcolor="#FEB341" width="10%"><div align="center"><font class="txt">READ</font></div></td>";
// Define colors for the alternating rows
$color1 = "#CCCCCC";
$color2 = "#999999";Code: Select all
echo "<tr>
<td width="7%" bgcolor="$row_color"><div align="center"><font class="txt"><a href="../index.php?pages=pmparse&id=$id&cmd=deleterecord">Delete</a> <input type="checkbox" value="$id" name="$id"></font></div></td>
<td width="15%" bgcolor="$row_color"><font class="txt">$sender</font></td>
<td width="49%" bgcolor="$row_color"><font class="txt">$subject</font></td>
<td width="20%" bgcolor="$row_color"><div align="center"><font class="txt">$date</font></div></td>
<td width="10%" bgcolor="$row_color"><div align="center"><font class="txt"><a href="../index.php?pages=read&id=$id">Read $read</a></font></div></td>
</tr>";
// Add 1 to the row count
$row_count++;
}
// Close out your table.
echo "</table></form>
<br>";I can delete a single record fine using the text "delete" option you can see in the loop above ..
Thanks