how to retrieve hashed password for login php
<p>i am trying to build my first login system, i am a beginner. </p>

<p>i want to retrieve a password from my database and use this code to check the login.</p>

<pre><code>if (password_verify($password, $hash)) {
    echo 'Password is valid!';
}
</code></pre>

<p>the password in the database is hashed using </p>

<pre><code>$hash = password_hash($_POST['password'], PASSWORD_DEFAULT)."\n";
</code></pre>

<p>i know i should use sql </p>

<pre><code>SELECT password FROM $tbl_name WHERE email='$email'
</code></pre>

<p>how do i connect $hash to my sql?</p>