<div style="overflow:scroll; border:1px solid black;background:#F5F9F0;width:520px; height: 650px">
<?php
echo "<table style='width:500px' class='myTable' >
<tr style='border:1px solid black' bgcolor='#adcd82'  >
<th>ΜΗΤΡΩΟ</th>
<th>ΤΜΗΜΑ</th>
<th>ΟΝΟΜΑΤΕΠΩΝΥΜΟ</th>
<th></th>
<th>ΕΠΙΛΟΓΗ</th>
</tr>";
echo "ccccc";
$i=1;
while ($row=$result->fetch(PDO::FETCH_ASSOC)) 
  { 
     echo "test";
    $am[$i]=$row['mitroo'];
	if(in_array($am[$i],$stuin))
	{
	   $checked = "checked";
	}
	else
	{
		$checked = "";
    }
	$tm1[$i]=$row['tmima'];
	$namet[$i]=$row['eponimo']." ".$row['onoma'];;
	echo "<tr>";
	echo "<td>".$am[$i]."</td>";
	echo "<td>".$tm1[$i]."</td>";
	echo "<td>".$namet[$i]."</td>";
	echo "<td>"." "."</td>";
    echo "<td ALIGN=center>"."<input type='checkbox' name='mitr[]' value='$am[$i]'  {$checked} >"."</td>";
	echo "</tr>";
    $i++;
}
echo "</table>";
?>
</div>
<?php