title: php mysqli bind_result returns 1
body: <p>Hello I am trying to make a login app using android and php running on an ec2 instance, but I cant login even if I put the right credentials.<br>
  So I started printing the query and if I print $user all I get is "1" any suggestions?</p>
  
  <pre><code>public function getUserByEmailAndPassword($email, $password) {
  
      $stmt = $this-&gt;conn-&gt;prepare("SELECT * FROM users WHERE email=?"); 
      $stmt-&gt;bind_param('s', $email);
      if ($stmt-&gt;execute()) {
          $stmt-&gt;bind_result($id,$unique_id,$name,$email,$encrypted_password,$salt,$created_at,$updated_at);
          $user = $stmt-&gt;fetch();
          $stmt-&gt;close();     
  
          // verifying user password
          $salt = $user['salt'];
          $encrypted_password = $user['encrypted_password'];
          $hash = $this-&gt;checkhashSSHA($salt, $password);
          // check for password equality
          if ($encrypted_password == $hash) {
              // user authentication details are correct
              return $user;
          }
      } else {
          return null;
      }
  }
  </code></pre>