From d6c77bc41a10c6cd98392e573aa03a824a96a74f Mon Sep 17 00:00:00 2001 From: ketertitus Date: Sun, 31 Mar 2024 14:14:17 +0300 Subject: [PATCH] PHPSESSID instead --- index.php | 6 +++--- login.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 8be2094..a5b7ba5 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ hgetall("user:$me"); } // Start session @@ -26,7 +26,7 @@

window.location.href = "login.php"'; diff --git a/login.php b/login.php index 635f369..e4af135 100644 --- a/login.php +++ b/login.php @@ -92,7 +92,7 @@ if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $hashedPassword = $row['password']; - $me = $row['user_id']; + $me = $_COOKIE['PHPSESSID']; if (password_verify($userEnteredPassword, $hashedPassword)) { // Store session data in Redis $sessionData = [