diff --git a/bank/index.php b/bank/index.php
index cc2461c..06377be 100644
--- a/bank/index.php
+++ b/bank/index.php
@@ -34,54 +34,59 @@
-
-
-
-
-
-
-
-
Query error: ' . mysql_error() . '
Query: ' . $query . '
');
+
+ /**
+ * Kijk of de query iets heeft teruggegeven. Anders geven we een error
+ */
+ if(mysql_num_rows($result) == 0) {
+ die('Inlog gegevens niet correct
');
+ } else {
+
+ /**
+ * Gebruiker heeft correct ingelogd. Laat zijn balans zien
+ */
+ $row = mysql_fetch_array($result);
+
+ echo "Welkom terug " . $row['gebruikersnaam'] . "! ";
+ echo "Uw balans is op dit moment: " . $row['balans'] . "
";
+ }
+ mysql_close($connection);
+} else {
+
+ /**
+ * Laat inlogformulier zien
+ */
?>
+
-
-
-

-
-
-
+
+