From 48dc6b0a237c7dd32e30afc00b82df9b5f3b6cca Mon Sep 17 00:00:00 2001 From: wiecktobi <39270895+wiecktobi@users.noreply.github.com> Date: Fri, 8 Jun 2018 17:29:14 +0200 Subject: [PATCH] Add files via upload --- php/login.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/php/login.php b/php/login.php index 1cd9bf1..2cb3a58 100644 --- a/php/login.php +++ b/php/login.php @@ -1,19 +1,22 @@ real_escape_string($_POST['registerName']); + $pswd = $database->real_escape_string($_POST['registerPassword']); + $email = $database->real_escape_string($_POST['registerMail']); - $abfrage = "SELECT PASSWORD WHERE loginName=NAME"; + + $abfrage = "SELECT password WHERE $name=user"; if ($pswd == $abfrage) { // code.. + echo "HI"; } -} - - - - + // if ($abfrage == "") { + $stmt = $database->prepare("INSERT INTO user(user, email, password) VALUES (?,?,?)"); + $stmt->bind_param("sss", $name, $email, $pswd); + $stmt->execute(); + $stmt->close(); + // } ?>