title: PHP Prepared statement has an issue
body: <p>Me again, more issues that I really can't find the cause off. </p>
  
  <p>The below code is producing: "Issue" which means the first IF statement is false, should be true. </p>
  
  <p>PHP:</p>
  
  <pre><code>function login($email, $password, $mysqli) {
      //Use prepared statements to stop SQL Injection
      if ($stmt = $mysqli-&gt;prepare("SELECT id, email, password, salt, perms FROM users WHERE email = ? LIMIT = 1")) {
          $stmt-&gt;bind_param('s', $email); //Bind "$email" to paramater
          $stmt-&gt;execute(); //Execute the query
          $stmt-&gt;store_result();
          $stmt-&gt;bind_result($user_id, $email, $db_password, $salt, $perms); //get variables from result
          $stmt-&gt;fetch();
          $password = hash('sha512', $password.$salt); //hash the password with the unique salt
  
          if ($stmt-&gt;num_rows == 1) { //If user exists
              //Check that user account isn't locked
              if (checkbrute($user_id, $mysqli) == true) {
                  //Account is locked, alert user
                  return false;
              } else {
                  if ($db_password == $password) { //Check that passwords match
                      //matches
                      echo "matches";
                  }
              }
          } else {
              echo "No user found!";  
          }
      } else { 
          echo "Issue";
      }
  }
  </code></pre>
  
  <p>$email and $password are not blank, and the $mysqli is the database object. Any ideas? 
  I can't figure it out at all, all looks fine to me. </p>