title: php ms sql login returning int -1 no value
body: <p>I am trying to verify a username and a password from the database but it is returning int -1 as seen on the below screenshot. code that I am using as follows </p>
  
  <pre><code>  public function logIn()
      {
          $email = $_POST['loginEmail'];
          $password = htmlspecialchars($_POST['loginPassword']);
          // if (strlen($password) &lt; 8 || !preg_match('/[0-9]/', $password) || !preg_match('/[A-Z]/', $password) || !preg_match('/[a-z]/', $password)) {
          //     echo "&lt;script&gt;alert('Not a valid Password');&lt;/script&gt;";
          // } else {
              // $salt = "ca34ff6ghh7ggs0hmn112dfg'";
              // $password = $password . $salt;
              // $password = sha1($password);
  
  
              $sqlQuery = "SELECT UserID FROM tbl_User WHERE Email='$email' AND Password='$password'";
              $statement = $this-&gt;_dbHandle-&gt;prepare($sqlQuery);
              $statement-&gt;execute();
              $count = $statement-&gt;rowCount();
  
              var_dump($email);
              var_dump($password);
              var_dump($statement);
              var_dump($sqlQuery);
              var_dump($count);
  
              if ($statement-&gt;rowCount() &gt; 0) {
                   var_dump($statement-&gt;rowCount());
              //     $row = $statement-&gt;fetch();
              //     var_dump($row);
              //     // $user = new UserData($row);
              //     // $userId = $user-&gt;getId();
              //     // $_SESSION['user_id'] = $userId;
              //     // header('location: index.php');
              } // else {
              //     echo '&lt;script&gt;window.alert("Try Again ww!")&lt;/script&gt;';
              // }
          // }
      }
  </code></pre>
  
  <p>Any help would be much appreciated. </p>
  
  <p><a href="https://i.stack.imgur.com/X9gKj.png" rel="nofollow noreferrer">Returning int -1</a></p>