im trying to make a Login System for my Website, i am able to Hash a password and insert the Hashed Data into the Database, however retrieving it is a little bit different.
I Am Making my Page search for the (Hashed Password) for the Given Username in the previous page, as well as the given Password from the previous page. Then getting my code to see if the two passwords match, however, i don't get a value return. And Yes, i am Echoing it, and suggestions?
<?php
session_start();
include 'dbh.php';
$Username = $_POST['Username'];
$Password = $_POST['Password'];
$sql = "SELECT * FROM account WHERE Username='$Username'";
$result = $conn->query($sql);
while ($row = $result->fetch_assoc()) {
$UsernameActualhashedPassword = $row['Password'];
}
$input = $Password;
echo $input;
echo $UsernameActualhashedPassword;
echo password_verify($input, $UsernameActualhashedPassword);