Take date from HTML5 form - and Post to MySQL
You need to use strtotime()
before calling date()
, so you can work on UNIX timestamps (which are required for date ;). Plus the indexes aren't matching the ones defined in the HTML.
$start = date("Y-m-d", strtotime($_GET['order_contractStart']));
$end = date("Y-m-d", strtotime($_GET['order_contractEnd']));
Also don't be fooled by w3schools!