title: Mysqli_query SELECT returns false
body: <p>I'm currently trying to get a certain user based on student number and password...problem is mysqli_query keeps returning false(?) statement. Though I checked the query via testing it in PHPMyAdmin. Here's my query:</p>
  
  <pre><code>$number = $_POST['number'];
  $password = $_POST['password'];
  
  $sql = "SELECT studentNumber FROM student where studentNumber = '$number'" ;
  $result = mysqli_query($conn, $sql) or die(mysqli_error());;
  
  if(!$result){
      echo "FAIL";
  }
  else if($result &gt; 0){
      header("register.html");    
  }else{
      $sql = "INSERT INTO 'sampleDB'.'student'('userID', 'studentNumber', 'password') VALUES ('', $number, $password)";
      header("login.html");
  }
  </code></pre>
  
  <p>Here's my connection part of the code: </p>
  
  <pre><code>$conn = new mysqli($servername, $username, $password);
  
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  }
  </code></pre>