title: PHP 7.4 Notice : Trying to access array offset on value of type bool in
body: <p>I have a simple login form using PDO prepared statements which worked fine under php 7.3 but under 7.4 i find this has an issue</p>
  
  <p>the code im using simply is:</p>
  
  <pre><code>if(isset($_POST['btn_login'])){
  
      $useremail = $_POST['txt_email'];
      $password = $_POST['txt_password'];
  
      $select= $pdo-&gt;prepare("select * from tbl_user where useremail='$useremail' AND password='$password'");
  
      $select-&gt;execute();
  
      $row=$select-&gt;fetch(PDO::FETCH_ASSOC);
  
      if($row['useremail']==$useremail AND $row['password']==$password){
  
          echo $success='Login Successful';
  
          header('refresh:1;dashboard.php');
      }else{
  
          echo 'Login Failed';
      }
  </code></pre>
  
  <p>using PDO and prepared statements whats the correct solution for php 7.4?</p>