query($sql)->fetch(PDO::FETCH_OBJ); if ($user) { $_SESSION['user'] = $user; header('Location: article_list.php'); exit(); } } ?>