<?php
session_start();
?>
<!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" />
<title>Untitled Document</title>
</head>

<body>

<?php
require "dbconnectom.php";

    $usr = $_POST['username']; 
    $pas = $_POST['password'];
    $usr = stripslashes($usr); 
    $pas = stripslashes($pas);
	$dt=date('Y-m-d');
    
    
    $sql = mysqli_query($con,"SELECT * FROM allstudentinfo WHERE mitroo='$usr' " ); 
    if(mysqli_num_rows($sql) == 1)
	{ 
        $row = mysqli_fetch_array($sql); 
        $name= $row['eponimo']." ".$row['onoma'];;
	    $_SESSION['n']=$name;
	    $_SESSION['pmp']=$usr;
	    $_SESSION['dt']=$dt;
        include "omiloidilosi.php";
	
    }
	else
	{ 
	echo " ΛΑΘΟΣ ΚΩΔΙΚΟΣ - ΔΟΚΙΜΑΣΤΕ ΞΑΝΑ";
 	include "omiloilogin.php"; 
    } 

?>
</body>
</html>