From c9e48af7a4fb1d79c65e519b0028ee3ee0958f9f Mon Sep 17 00:00:00 2001 From: Jamo Date: Mon, 20 May 2019 20:16:43 +0200 Subject: [PATCH] Login now fully working --- checkLogin.php | 4 ++-- dashboard.php | 2 +- plugins/home.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/checkLogin.php b/checkLogin.php index 29f1c70..db851b0 100644 --- a/checkLogin.php +++ b/checkLogin.php @@ -26,13 +26,13 @@ die(); } else { $_SESSION['attempted'] = "n"; - $sql = "SELECT password FROM users WHERE mail='$mail'"; + $sql = "SELECT * FROM users WHERE mail='$mail'"; $result = $conn->query($sql); while($row = $result->fetch_assoc()) { if(strtolower($row["password"]) == hash('sha512',$password)) { $_SESSION['login'] = 'user'; $_SESSION['usermail'] = $mail; - $_SESSION['username'] = $row["username"]; + $_SESSION['username'] = $row['username']; header("Location: dashboard.php"); die(); } else { diff --git a/dashboard.php b/dashboard.php index bdd2b0a..3c751fe 100644 --- a/dashboard.php +++ b/dashboard.php @@ -2,7 +2,7 @@

Home

-

Welcome Username!

+

Welcome

There are currently 4 Servers with a total of 13 Players