From 18321d86cdd870ed036be7a12b4352c085555948 Mon Sep 17 00:00:00 2001 From: Givou Date: Mon, 6 Feb 2023 20:28:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eauth.php=E2=80=9C=20l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth.php | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 auth.php diff --git a/auth.php b/auth.php deleted file mode 100644 index 525f7ac..0000000 --- a/auth.php +++ /dev/null @@ -1,50 +0,0 @@ -prepare('SELECT id, password FROM accounts WHERE username = ?')) { - $stmt->bind_param('s', $_POST['username']); - $stmt->execute(); - - $stmt->store_result(); - - if ($stmt->num_rows > 0) { - $stmt->bind_result($id, $password); - $stmt->fetch(); - - if (password_verify($_POST['password'], $password)) { - session_regenerate_id(); - - $_SESSION['loggedin'] = TRUE; - $_SESSION['name'] = $_POST['username']; - $_SESSION['id'] = $id; - - header("Location: admin.php"); - } else { - //Incorrect Data - echo 'Incorrect username and/or password!'; - } - - } else { - //Incorrect Data - echo 'Incorrect username and/or password!'; - } - - $stmt->close(); -} - - -?>