`
?>
<table border="1">
<tr>
<th><input type="checkbox" id="selectall"/></th>
<th style="width:86px;">News ID</th>
<th style="width:150px;">Title</th>
<th style="width:590px;"><center>Description</center></th>
<th style="width:100px;">Status</th>
<th rowspan="1" colspan="2" style="width:350px"><center>Action </center></th>
</tr>
<?php
while ($rows= mysql_fetch_array($result)) {
?>
<tr>
<td align="center" bgcolor=""> <input name="checkbox[]" type="checkbox" id="checkbox[]"
value="<? echo $rows['news_id']; ?>"> </td>
<td><center><?php echo $rows["news_id"]; ?> </center></td>
enter code here<td><center><?php echo $rows["news_title"]; ?> </center></td>
<td><center><?php echo $rows["news_content"]; ?></center> </td>
<td><center><?php echo $rows["status"]; ?></center> </td>
<td><center><a href="update_data.php<?php echo $var ?>"><img src="images/update.jpg"
height="40px" width="100px" /></a></center> </td>
<td><center><a href=""><img src="images/delete.jpg" height="40px" width="100px" /></a>
</center> </td>
</tr>
<?php
}
?>
<?php
include('dbconnect.php');
$del_id = $_POST['checkbox'];
$detectinglocations = 'news_id';
foreach($del_id as $value){
$sql = "DELETE FROM ".$detectinglocations." WHERE id='".$value."'";
$result = mysql_query($sql);
}
}
?>
?>
<tr>
<td> </td>
</tr>
</table>'
This is the code I have done so far... But don't knw what to do ahead.. Help me if anybody knws..!!!
I want to Delete Multiple Records with checkboxes and select all delete rows and particular rows delete