title: date formatting from yyyy-m-d to yyyy-mm-dd
body: <p>I am getting date from a calendar using the code</p>
  
  <pre><code>if ($_POST){
      $m = $_POST['m'];
      $d = $_POST['d'];
      $y = $_POST['y'];
  
  $event_date = $y."-".$m."-".$d;
  </code></pre>
  
  <p>the date is of the format yyyy-m-d how can i change the format to yyyy-mm-dd so i can insert into database</p>