if(isset($_POST['Submit']))
{
foreach($_POST['check'] as $val1)
{
mysql_query("delete from tablename where id=".$val1."");
}
}
?>
<?php
$rec=mysql_query("select * from table name");
while($row=mysql_fetch_array($rec))
{
?>
<input type="checkbox" name="check[]" value="<?php echo $row['id'];?>" />
<?php }?>
<input type="submit" name="Submit" value="Delete" />
{
foreach($_POST['check'] as $val1)
{
mysql_query("delete from tablename where id=".$val1."");
}
}
?>
<?php
$rec=mysql_query("select * from table name");
while($row=mysql_fetch_array($rec))
{
?>
<input type="checkbox" name="check[]" value="<?php echo $row['id'];?>" />
<?php }?>
<input type="submit" name="Submit" value="Delete" />
No comments:
Post a Comment