I think that the lines:
$query = mysql_query("DELETE FROM `1in` WHERE CONVERT(`1in`.`Type` USING utf8) = '$type' AND CONVERT(`1in`.`Batch` USING utf8) = '$batch'") or die(mysql_error());
if(mysql_num_rows($query)>0)
{
include("in1delup.php");
}
The $query line shouldnt have the actual mysql_query command on it, just the "DELETE FROM....". Cause right now, ur deleting all the rows, then asking if there are any left, so of course there wont be, u just deleted them. I dont know if im right, someone else needs to confirm this.