I am generating a password in PHP as follows:
$options = [
'cost' => 11,
];
// Get the password from post
$passwordFromPost = $_POST['password'];
$hash = password_hash($passwordFromPost, PASSWORD_BCRYPT, $options);
and I insert it in a MySQL table.
Now, I would like to retrieve it. I was using a hash+salt password, but I would like to remove the salt option. How could I retrieve the created password in PHP?
SELECT hash FROM tablequery should fetch it. You shouldn't be mucking around with the automatic salts. I feel like I'm missing something in your question.password_verify()to check if user-supplied input matches your stored value.