From 1c292db602e0cca212b6646356f3e9c09e5ef0a6 Mon Sep 17 00:00:00 2001 From: Findus23 Date: Fri, 27 Dec 2013 12:00:45 +0100 Subject: [PATCH] =?UTF-8?q?Login+kleine=20=C3=84nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- login.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ ort_aendern.php | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 login.php 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:

-

+