Good, what happens is that I'm super lost with this encrypted keys in php ..... I have a code that already keeps me in the database the keys (already encrypted) my problem now is how to verify them , I have the following code, I guess it will be wrong, and investigated and I can not find a solution, and loaded the password encrypted in a variable, but password_verifi does not work, the number 5 nothing else is a test, since it is the password of an account that I have saved, even so I throw the error is not valid, help ....
<?php
$mysqli= new mysqli("localhost", "root","", "sistema");
$nombre =isset($_POST['usuario']) ? $_POST['usuario'] : null ;
$contra =isset($_POST['contra']) ? $_POST['contra'] : null ;
$query="SELECT * FROM usuario WHERE usuario='$nombre'";
$resultado=$mysqli->query($query);
$row=$resultado->fetch_assoc();
$hash= $row['password'];
echo $hash;
if (password_verify('5', $hash)) {
echo '¡La contraseña es válida!';
} else {
echo 'La contraseña no es válida.';
}
?>