<?php
	session_start(); 
	include 'dbc.php';
		
	if($_POST['delete']) // from button name="delete"
	{
		$checkbox = $_POST['checkbox']; //from name="checkbox[]"
		$countCheck = count($_POST['checkbox']);
		
		for($i=0;$i<$countCheck;$i++)
		{
			$del_id  = $checkbox[$i];
			
			$sql = "DELETE from qu where Id = $del_id";
			
			$result=mysql_query($sql) or die ("Error:" . mysql_error());
			
		}
			if($result)
		{	
				header('Location: enter_question_paper_report_del.php');
			}
			else
			{
				echo "Record dos not delteted";
			}
	}
?>