title: Why is password_verify returning false?
body: <p>I'm using a <code>password_verify</code> to check my hashed password. I have PHP 5.5:</p>
  
  <pre><code>   $this-&gt;db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
  
  
          // if no connection errors (= working database connection)
          if (!$this-&gt;db_connection-&gt;connect_errno) {
  
              // escape the POST stuff
              $user_name = $this-&gt;db_connection-&gt;real_escape_string($_POST['user_name']);
  
              // database query, getting all the info of the selected user (allows login via email address in the
              // username field)
              $sql = "SELECT user_name, user_email, user_password_hash
                      FROM users
                      WHERE user_name = '" . $user_name . "' OR user_email = '" . $user_name . "';";
              $result_of_login_check = $this-&gt;db_connection-&gt;query($sql);
  
              // if this user exists
              if ($result_of_login_check-&gt;num_rows == 1) {
  
                  // get result row (as an object)
                  $result_row = $result_of_login_check-&gt;fetch_object();
  
                  // using PHP 5.5's password_verify() function to check if the provided password fits
                  // the hash of that user's password
  
  
                  if (password_verify($_POST['user_password'], $result_row-&gt;user_password_hash)) {
  
                      // write user data into PHP SESSION (a file on your server)
                      $_SESSION['user_name'] = $result_row-&gt;user_name;
                      $_SESSION['user_email'] = $result_row-&gt;user_email;
                      $_SESSION['user_login_status'] = 1;
  </code></pre>
  
  <p>I'm getting <code>false</code> on <code>password_verify</code>. I've already checked the posts value and mysql user_password_hash return.</p>
  
  <p>I don't know why it's returning false</p>
  
  <p>Any ideas?</p>