skip to Main Content

Php – Login session not accessible other than redirected page

This is my login.php if ($_SERVER["REQUEST_METHOD"] == "POST") { $username = $_POST['username']; $password = $_POST['password']; $stmt = $conn->prepare("SELECT * FROM admin WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $_SESSION['username'] = $username;…

VIEW QUESTION

Laravel 11 – This password does not use the Bcrypt algorithm

Error during Auth::attempt($credentials) . Followed https://laravel.com/docs/11.x/authentication#authenticating-users I've created simple seeder: $hashedPassword = Hash::make('password'); User::factory()->create([ 'name' => 'Admin User', 'login' => 'admin', 'password' => $hashedPassword, 'role' => 'Admin', ]); Phpmyadmin I am trying to log in user with public function loginUser(Request…

VIEW QUESTION
Back To Top
Search