<?php
session_start();
include "logo.php";
?>

<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 black;padding:2px;font-size:11px; }
<p style="font-size:11px;"></p>
</style>


</head>
<body  style="width:995px; margin:0 auto; ">

<?php 
require("dbconnect.php");
echo "<br>"."<br>";
$sql=  mysqli_query($con,"SELECT  COUNT(mathima) as cm,mathima FROM mathall  WHERE type='K' group by mathima order by mathima ASC  " );

echo "ΕΞΕΤΑΖΩΜΕΝΑ ΜΑΘΗΜΑΤΑ Β ΛΥΚΕΙΟΥ";
echo "<br>";
echo "<table class='myTable' >
<tr style='border:1px solid black;font-size:16px'  >
<tr>
<th>Μάθημα</th>
<th>Αριθμός</th>
</tr>";	
while ($row=mysqli_fetch_array($sql))
{
 
   echo "<tr>";
   echo "<td>". $row['mathima']. "</td>";
   echo "<td>". $row['cm'] . "</td>";
 
   echo "</tr>";
}
echo "</table>"; 


$result = mysqli_query($con,"SELECT  count(DISTINCT(mitroo)) as stus FROM mathall " );
$row=mysqli_fetch_array($result);
echo "<br>"."ΣΥΝΟΛΟ ΜΑΘΗΤΩΝ : ".$row['stus'];
$result = mysqli_query($con,"SELECT  count(DISTINCT(mitroo)) as stus FROM mathall WHERE type='K' " );
$row=mysqli_fetch_array($result);
echo "<br>"."ΣΥΝΟΛΟ ΜΑΘΗΤΩΝ ΠΟΥ ΔΗΛΩΣΑΝ ΕΧΕΤΑΖΩΜΕΝΑ : ".$row['stus'];
?>	
<br /><br />
<a  href='indexd.php' style="color:blue "  > <button> Επιστροφή στο Μενού  </a>

</body>
</html>