For those who have the doubt as I had, below I'll leave the code ready, just change to your project. The code and simply know the user logged in and say the name of it in PHP PDO. If your project is by cookie will work, if it is session adapt your code to mine.
// USER NAME
$sql= "SELECT * FROM nomedasuatabela WHERE email='$login_cookie'";
$stmt = $conexao->prepare($sql);
$stmt->bindParam(':email', $login_cookie, PDO::PARAM_INT);
$stmt->execute();