This commit is contained in:
Flatlogic Bot 2025-10-20 23:24:25 +00:00
parent 41e03f0c1f
commit 53ddf15d83

View File

@ -17,6 +17,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$stmt->execute([$username]); $stmt->execute([$username]);
$user = $stmt->fetch(); $user = $stmt->fetch();
// DEBUGGING LINES
echo "<!--";
echo "Submitted password: " . htmlspecialchars($password) . "\n";
echo "User data from DB: ";
print_r($user);
echo "Password verification result: " . (password_verify($password, $user['password']) ? 'true' : 'false') . "\n";
echo "-->";
// END DEBUGGING LINES
if ($user && password_verify($password, $user['password'])) { if ($user && password_verify($password, $user['password'])) {
$_SESSION['user_id'] = $user['id']; $_SESSION['user_id'] = $user['id'];
$_SESSION['username'] = $user['username']; $_SESSION['username'] = $user['username'];