<?php
include "scrinit.php";
include "dbconnect.php";
?>

<head>
<title>Εύρεση Στοιχείων Μαθητή</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
</body>
<?php
$text = $_POST['text'];
$sql = $dbcon->prepare("SELECT * FROM allstudentinfo where eponimo LIKE '%$text%'");
$sql->execute();
$row=$sql->fetch(PDO::FETCH_ASSOC);
	if($sql->rowCount() > 0){
		echo '<ul class="search_ul">';
		while ($row=$sql->fetch(PDO::FETCH_ASSOC)) 
		{
			echo '<li><a href="">'.$row["eponimo"]." ".$row['onoma']." (".$row['tmima']."-".$row['mitroo']." )".'</a></li>';
		}
		echo '</ul>';
	}
?>