$post = $pdo->prepare('SELECT * FROM post ORDER BY id DESC LIMIT 2');
$post->execute();
$news = $post->fetchAll(PDO::FETCH_BOTH);
<?php foreach ($news as $n): ?>
<p><strong><?php echo $n['date'] ?></strong> <?php echo $n->h1 ?></p>
<?php endforeach ?>
parse_str(file_get_contents('php://input'), $rgInputData);
//var_dump($rgInputData);