I'm very new to PDO. The issue I'm currently facing is that I'm trying to grab a users first name from a column however I have no idea how to fetch it properly. I've managed to find verify the user email with the email in the database now I just need to fetch the UserFirstName column and store it in a variable.
$data = array();
if(isset($_POST['email'])){
$data = $_POST['email'];
if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
$data = $_POST['email'];
$stmt = $pdo->prepare('SELECT * FROM users WHERE UserEmail = :UserEmail');
$stmt->execute(array(':UserEmail' => $data));