title: Take date from HTML5 form - and Post to MySQL
body: <p>I've got a basic web form, and I need to take a date from a "date" type input (html5 see <a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_date" rel="nofollow">http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_date</a>) and post it into my MySQL database (which has a type of DATE - note: not DATETIME).</p>
  
  <p>I need some kind of PHP/JS voodoo to make the 2 talk to each other, Any clues?</p>
  
  <p>Heres what I've got so far, and it always produces the default date of 1970-01-01.</p>
  
  <p>Would it be better to do it as a plain input and force the format with Jquery?</p>
  
  <pre><code>&lt;!-- zee form: --&gt;
  &lt;div&gt;
      &lt;!-- Start Date --&gt;
      &lt;div&gt;
          &lt;label class="col-offset-half col-3" for="order_contractStart"&gt;Contract Start:&lt;/label&gt;
          &lt;input class="col-offset-half col-7" type="date" id="order_contractStart" name="order_contractStart"&gt;
      &lt;/div&gt;
      &lt;!-- End Date --&gt;
      &lt;div&gt;
          &lt;label class="col-offset-half col-3" for="order_contractEnd"&gt;Contract End:&lt;/label&gt;
          &lt;input class="col-offset-half col-7" type="date" id="order_contractEnd" name="order_contractEnd"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Then in my action I have:</p>
  
  <pre><code>//Get Variables from form
  $start = date("Y-m-d", $_GET['order_start']);
  $end = date("Y-m-d", $_GET['order_end']);
  </code></pre>
  
  <p>Turns out this method isn't really working - so any pointers would be greatly appreciated.</p>