<?php
include "scrinit.php";
include "logo.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid green;padding:2px;font-size:10pt; }
<p style="font-size:10px;"></p>
</style>
</head>

<body>
<?php
include "dbconnect.php";
$sql1 = "SELECT count(mitroo) as cs,tmima FROM allstudentinfo group by tmima";
$rt = $dbcon->prepare($sql1);
$rt->execute();
echo "<br>"."ΚΑΤΑΛΟΓΟΣ ΤΜΗΜΑΤΩΝ:"."</b>". "<br>"."<br>";
echo "<table class='myTable' >
<tr style='border:2px solid black;font-size:12px'  >
<tr>
<th>α/α</th>
<th>ΤΜΗΜΑ</th>
<th>ΑΡΙΘΜΟΣ ΜΑΘΗΤΩΝ</th>
";
echo "</tr>";
$i=1;
while($row = $rt->fetch(PDO::FETCH_ASSOC))
{
	 $tm=$row['tmima'];
	 $cs=$row['cs'];
	 echo "<tr>";
	 echo "<td>" .$i;
     echo "<td>".$tm  . "</td>";
	 echo "<td>".$cs  . "</td>";
     
	 echo "</tr>";
	 $i++;
}
echo "</table>";

?>
<br> 
 <a  href=<?php echo $menu;?> style="color:blue "  > <button> Επιστροφή στο Μενού   </a>  
</body>
</html>