SQL query in php using value from form field

iwr 30 Sep, 2020
Hi,

I am trying to run an php script that uses the value from a calendar element on a form. (2 fields a "from Date" and a "to date")
So that only the dates are picked. The field on the form is calendar14 and calendar15.

I can get it to work if I use created <= NOW() '); in the select query but I get blank screens when i try
$pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, FALSE);

$this->get("calendar14");

// Run our SELECT query
// Fields returned here MUST match with CSV column headers specified below
$resultset = $pdo->query("SELECT * FROM `mytable` WHERE created >= '" . $this . "'");

if (!$resultset) die('Couldn\'t fetch records');

Any advice please?
You need to login to be able to post a reply.