title: PDO login script won't work
body: <p>I changed this login script to PDO. Now it passes the username but get's stuck fetchAll line. I need help please. thanks</p>
  
  <pre><code>&lt;?php 
  session_start();
  include_once"includes/config.php";
  
  if (isset($_POST['admin_login'])) {
    $admin_user = trim($_POST['admin_user']);
    $admin_pw = trim($_POST['admin_pw']);
  
    if ($admin_user == NULL OR $admin_pw == NULL) {
      $final_report.="Please complete all the fields below..";
    } else {
      $check_user_data = $db-&gt;prepare("SELECT * FROM `admin` 
        WHERE `admin_user`='$admin_user'");
      $check_user_data-&gt;execute();
  
      if ($check_user_data-&gt;fetchColumn() == 0) {
        $final_report.="This admin username does not exist..";
      } else {
        $get_user_data = $check_user_data-&gt;fetchAll($check_user_data);
  
        if ($get_user_data['admin_pw'] == $admin_pw) {
          $start_idsess = $_SESSION['admin_user'] = "".$get_user_data['admin_user']."";
          $start_passsess = $_SESSION['admin_pw'] = "".$get_user_data['admin_pw']."";
          $final_report.="You are about to be logged in, please wait a few moments...";
          header('Location: admin.php');
        }
      }
    }
  }
  ?&gt; 
  </code></pre>