X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/4678f209fb04682d0981cadb566d63f5726f9e09..8db41c98817b1b48532dc3cebf4bea166e42bb70:/include/usercheck.inc
diff --git a/include/usercheck.inc b/include/usercheck.inc
new file mode 100644
index 0000000..e6cab54
--- /dev/null
+++ b/include/usercheck.inc
@@ -0,0 +1,22 @@
+query("SELECT COUNT(*) FROM students WHERE mnumber = $mnumber")->fetch(PDO::FETCH_NUM)[0] == 0) {
+ print '
';
+ print 'Mat.nummer not found |
---|
';
+ print '
';
+ print "Mat.Nummer was not found. You have to register first!";
+ break;
+ }
+
+ if($db->query("SELECT COUNT(*) FROM students WHERE mnumber = $mnumber AND password = \"$password\"")->fetch(PDO::FETCH_NUM)[0] == 0) {
+ print '';
+ print 'wrong password |
---|
';
+ print '
';
+ break;
+ }
+
+?>
\ No newline at end of file