my password is hashed and saved in database but it is couldn't match it with the password which user is giving in textbox.
//form submission
if(isset($_POST['submit_pwd']))
{ //input form username
$us = isset($_POST['usr']) ? $_POST['usr'] : '';
// input for user password
$passw = isset($_POST['passwd']) ? $_POST['passwd'] : '';
//retreiving vlaues from database
$sql = "SELECT * FROM adminclient";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
$username= $row['username'];
$password = $row['password'];
//username and password matches from database
if ($us == $username && password_verify($passw, $password) ) {
session_start();
$_SESSION['username']=$_POST['usr'];
header("location: success.php");
}
}echo " <script type='text/javascript'>
alert('Wrong Username and Password combination');</script> ";
}
}
?>