title: convert php date to mysql format
body: <p>I have a date field in php which is using this code: </p>
  
  <pre><code>$date = mysql_real_escape_string($_POST['intake_date']);
  </code></pre>
  
  <p>How do I convert this to MySql format 0000-00-00 for inclusion in db. Is it along the lines of: date('Y-m-d' strtotime($date);. The reason I ask, is because I have tried variations of this and I cannot seem to get it to work. Either displays as 1970 or some other variation of that. Many thanks</p>