<?php
if(isset($_POST['delete']))
{
$checkbox = $_POST['checkbox']; //from name="checkbox[]"
$countCheck = count($_POST['checkbox']);
for($i=0;$i<$countCheck;$i++)
{
$del_id = $checkbox[$i];
$sql = "DELETE FROM tbl_absence WHERE absID='$del_id'";
$result = mysql_query($sql);
}
// if successful redirect to delete_multiple.php
if($result)
{
echo "<meta http-equiv=\"refresh\" content=\"0;URL=absent_inbox.php\">";
}
}
mysql_close();
?>
No comments:
Post a Comment