title: Insert date to mysql from php
body: <p>Am trying to insert date to a MYSQL column with datatype DATE . the following code is used.</p>
  
  <pre><code>$expiry = date("Y-m-d H:i:s", $_POST['expiry']);
  </code></pre>
  
  <p>but the mysql column shows <code>01-Jan-70 12:00:00 AM</code> . have also used <code>strtotime()</code> but it seems to insert NULL.</p>
  
  <p>The html input takes <code>YYYY-MM-DD</code> as date format input</p>
  
  <p>any help appreciated. </p>