<?php 

include("database.php");
if($_GET['q']!="")
{	
	$q=$_GET["q"];
	$sql="SELECT * FROM master_ward_drop WHERE wid= '".$q."' ";
	$rest=mysql_query($sql);
	$num = mysql_num_rows($rest); 
	if($num >0)
	{?>
    
    <input type="checkbox" value="All" name="subward" onclick="checkall();">All<br>
    <?php 
	$f=0;
	while($row=mysql_fetch_array($rest))
	{
		if($f==2)
		{
			echo "<br>";
			$f=0;
		}
?>
	   
	 
   <input type="checkbox" value="<?php print $row['did'];?> " name="subward"><font class="font4"><?php print $row['dvalue'];?></font>
<?php
		$f++;
	}
	}
}
	?>

