 <p>You have to rewrite your SQL statement, it is not possible to search for a salted hash in the database. Search only by username and afterwards check the found hash with <code>password_verify()</code> as you did:</p> <pre><code>$sql = "SELECT username,passwordHash FROM users WHERE username = ?"; ... mysqli_stmt_bind_param($stmt, "s", $username); if (password_verify($passWD, $passWDHash)) { echo "&lt;p&gt;Login successful&lt;/p&gt;"; } </code></pre>