I am trying to take a variable passed from another page and use it in a PDO query. The variable is the date the record was added and I'm trying to return all the newer records. Do I use $_POST for this in PDO?
<?php
require_once('globals.php');
$date_added = $_POST['date_added'];
$sth = $dbh->prepare("SELECT * FROM games WHERE date_added > $date_added");
$sth->execute();
/* Fetch all of the remaining rows in the result set */
print("Fetch all of the remaining rows in the result set:\n");
$result = $sth->fetchAll();
print_r($result);
?>