diff --git a/app/public/css/login.css b/app/public/css/login.css index 1298c77..6ceefbf 100644 --- a/app/public/css/login.css +++ b/app/public/css/login.css @@ -101,3 +101,12 @@ input[type="submit"]:hover{ border-color: #2691d9; transition: .5s; } + +.warnings { + outline: none; + margin-top: 0px; + margin-bottom: 10px; + background-color: #ff8080; + border-radius: 4px; + padding: 4px; +} \ No newline at end of file diff --git a/app/public/login.php b/app/public/login.php index b2fc870..d63036b 100644 --- a/app/public/login.php +++ b/app/public/login.php @@ -2,6 +2,8 @@ session_start(); include("../scripts/connection.php"); include("../scripts/functions.php"); + $password_wrong = false; + $wrong_data = false; if($_SERVER['REQUEST_METHOD'] == "POST"){ $user_name = sanitize_input($_POST['user_name']); @@ -21,14 +23,14 @@ } die; } else { - echo "Benutzername oder Passwort stimmen nicht"; + $password_wrong = true; } } else { - echo "Benutzername oder Passwort stimmen nicht"; + $password_wrong = true; } } else { - echo "Gib bitte gültige Daten ein!"; + $wrong_data = true; } } $con = null; @@ -57,6 +59,21 @@ + + + "; + } + + if ($wrong_data == true) { + echo " +
+ +
"; + } + ?>