title: How to select a hashed password from mysql db
body: <p>Okay, so I'm trying to make a register/login code for my personal website.<br>
  I had no troubles making the registration form but I'm having some difficulties with the login.<br>
  Here's a part of my code: </p>
  
  <pre><code>        $stmt = $pdo-&gt;prepare("SELECT password FROM members where username = ? ");
      $stmt-&gt;bindValue(1, $username);
      $stmt-&gt;execute(); 
  </code></pre>
  
  <p>Now to my understanding i need to fetch the first row from my table convert it to a string and then using <code>password_verify</code> to compare that string to whatever the users inputs in the form i created. The problem i have is that it fetches an array and can't really use <code>password_verify</code> to compare a string to an array.<br>
  Am I doing something wrong? how should I do this?<br>
  tl; dr How do I actually select a hashed password from DB, convert it to a string and then compare that string with the password my user will input.<br>
  Thanks.</p>