title: convert date data into mysql date format
body: <p>I want to convert the data on which I have the format</p>
  
  <pre><code>$dateToday = date("d-m-Y");
  </code></pre>
  
  <p>so the value of $dateToday is <strong>27-12-2012</strong></p>
  
  <p>Then I want to save it to the database with the mysql data type <em>date</em>. How to keep the value of <strong>27-12-2012</strong> it can be stored in the mysql database with the format <strong>2012-12-27</strong>?
  Help me please. Thank you</p>