diff --git a/login.php b/login.php new file mode 100644 index 0000000..38e5a4d --- /dev/null +++ b/login.php @@ -0,0 +1,55 @@ +prepare("SELECT passwort FROM benutzer WHERE username=?")) { + $stmt->bind_param("s", $user); + $stmt->execute(); + $stmt->bind_result($password_db); + $stmt->fetch(); + if($password_db == $password_hash) { + echo "Hallo $user"; + $richtig="yes"; + setcookie("angemeldet", $user); + } else { + echo "falsches Passwort"; + } + + } else { + echo "falscher Benutzername"; + } + $mysqli->close(); +} +if (!isset($richtig) || $richtig != "yes") { +?> + + + +
+ +PLZ: Stadt:
Straße: Hausnummer:
- +