title: Are prepared statements needed to fetch value
body: <p>Are prepared statements needed to fetch a value?  If so, I can't find a reference.  I am using prepared statements to write to MYSQL.  Here is my working code. Thanks</p>
  
  <pre><code>//Check that Email matches Password, then get First Name and start session
  if ($getFname = mysqli_fetch_assoc(mysqli_query($con, "SELECT userFname FROM users   WHERE userEmail = '$userEmail' and userPassword = '$userPassword'"))) {
  
      //Grab first name
      $data = $getFname['userFname'];
  
      //assign unique session ID
      $_SESSION[Email]=$userEmail;
  
      //Remember first name
      $_SESSION[Fname] = $data;
  
      //go to dashboard page
      header ("location: dashboard.php");}
  
  }else{ 
        $error2="Email and Password do not match, please try again."; 
      }
  </code></pre>