<?php
include("../../session.php");
include("../../connect.php");

$user=$_SESSION['company'];

	$count=array();
	$count=$_POST['checkbox'];
	$num = count($count);
	//echo $num;
	if($num>0){
	if(isset($_POST['delete']))
	{
	
	
	//print_r($count);
	for($i=0;$i<count($count);$i++){
        
		$del_id = $count[$i];
		echo "<br/>";
		//print_r($del_id);
		echo "<br/>";
        $sql = "DELETE FROM inbox WHERE inboxID='$del_id'";
		
        $result = mysql_query($sql);
	}//end for
	$NEW="Selected records Deleted";
}//end if

	mysql_close($login);
	echo "<script language=javascript>alert('Delete inbox successful!!');window.location='inboxFeed.php'</script>";
}else if($num<=0){
	echo "<script language=javascript>alert('No data delete!!');window.location='inboxFeed.php'</script>";
}
?>