6 $mnumber = $_POST['mnumber'];
7 $password = $_POST['password'];
9 if(! is_numeric($mnumber)) {
10 block("red", "Matr.nummer has to be numeric!");
14 if($db->query("SELECT COUNT(*) FROM students WHERE mnumber = $mnumber")->fetch(PDO::FETCH_NUM)[0] == 0) {
15 print '<table bgcolor="red">';
16 print '<tr><th><b><font color="white">Mat.nummer not found</font></b></th><tr>';
18 print "Mat.Nummer was not found. You have to register first!";
22 if($db->query("SELECT COUNT(*) FROM students WHERE mnumber = $mnumber AND password = \"$password\"")->fetch(PDO::FETCH_NUM)[0] == 0) {
23 print '<table bgcolor="red">';
24 print '<tr><th><b><font color="white">wrong password</font></b></th><tr>';