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") { +?> + + + + + + Login + + + + + +
+

Benutzername:

+

Passwort:

+

+
+ + + + + + + + \ No newline at end of file diff --git a/ort_aendern.php b/ort_aendern.php index 89c92ac..7df29a6 100644 --- a/ort_aendern.php +++ b/ort_aendern.php @@ -31,7 +31,7 @@ if (empty($_POST["name"])) {

PLZ: Stadt:

Straße: Hausnummer:

-

+