title: How to apply the bcrypt also how to fetch data
body: <p>When I try to login it doesn't display any information, it didn't get the data in database.</p>
  
  <pre><code>if($_SERVER['REQUEST_METHOD']=='POST'){
  
      //filter this variable for security
      $username = strip_tags(mysqli_real_escape_string($conn, trim($_POST['username'])));
      $password = strip_tags(mysqli_real_escape_string($conn, trim($_POST['password'])));
  
      $stmt = $conn-&gt;prepare("SELECT id FROM students WHERE s_id = ?");
      $stmt-&gt;bind_param("s",$username);
      $stmt-&gt;execute();
      $user = $stmt-&gt;fetch();
      if($user == FALSE) {
          die("Incorrect");
      }else {
  
          $password_hash = $user['password'];
  
          $validPassword = password_verify($password, $password_hash);
  
           if($validPassword){
  
              echo "success";
  
          } else{
              //$validPassword was FALSE. Passwords do not match.
              echo 'Incorrect username / password combination!&lt;br/&gt;';
              echo $user['password'];
          }
      }
     }
  </code></pre>