
<?php

session_start();

include('dbconnect.php');

//collect the passed id

$id = $_GET['tmimaid'];

//run a query

$sql2 = mysqli_query($con,"SELECT mitroo, eponimo,onoma FROM allstudentinfo WHERE tmima = '$id' ORDER BY eponimo,onoma");

//loop through all returned rows
echo "ccccccccccccccccccccccccccccccccccccc";
while($row = mysqli_fetch_array($sql2) ) {
    $m=$row['mitroo'];
	$stname=$row['eponimo']."  ".$row['onoma'];
	$dispitem=$m."  ".$stname;
	
    echo "<option value='$m'>$dispitem</option>";

}