title: PHP login error - it always lets me login no matter if a user exists or not
body: <p>code - not sure whats happening please help:</p>
  
  <pre><code>$accountname = $_POST['logname'];
  $password = $_POST['logpassword']; 
  echo '&lt;br&gt;';
  
  $logsql = mysqli_query("SELECT Name FROM practice.users WHERE Name = $accountname and Password = $password;");
  if (mysqli_num_rows($logsql) &lt; 0) {
       echo 'Account doesnt exist';
  }
  else {
      echo 'Welcome ' . $accountname;
  }
  </code></pre>