title: why isnt my mysqli query returning any rows
body: <p>So i'm trying to make a login system and its not working because every time I test the number of rows via this code:</p>
  
  <pre><code>$username=$_POST['username']; 
  $password=$_POST['password']; 
  $username = stripslashes($myusername);
  $password = stripslashes($mypassword);
  $username = mysqli_real_escape_string($username);
  $password = mysqli_real_escape_string($password);
  $result=mysqli_query($connect,"SELECT * FROM users  WHERE username='$username'");
  $count=mysqli_num_rows($result);
  if($count==1){
  </code></pre>
  
  <p>but everytime I run it it doesn't return 1, I don't even know how to check what its returning and when I remove $username's '' marks it comes up invalid query</p>
  
  <p>Im using PHP 5.4.4-14, Mysql  Ver 14.14 Distrib 5.5.31, for debian-linux-gnu (armv7l) using readline 6.2, and Apache/2.2.22 (Debian)</p>