title: PHP Convert Textual Month, Day and Year to date data for MySQL Table
body: <p>I tried asking this question earlier but I had a prior problem of properly obtaining textual month, day and year date from an input field in an HTML table.</p>
  
  <p>Now that I have obtained this string data, in this case "Aug 25, 2014", I want to convert into date data that will eventually be inserted into a MySQL table.</p>
  
  <p>PHP:</p>
  
  <pre><code>$todays_date = strtotime("today");
  
  echo "&lt;form name='timesubmit" . $time_cell_row . "' action='enter_time.php?action=timesubmit" .$time_cell_row . "' method='POST'&gt;";  
  
  echo "&lt;table&gt;"
  echo "&lt;th&gt;&lt;input name='daycell1' type='text' value='$FormattedCurrDate' readonly/&gt;&lt;/th&gt;";
  echo "&lt;/table&gt;";
  echo "&lt;/form&gt;";
  
  /* Code in place to GET action from URL
  
  */
  
  $date1 = $_POST['daycell1'];
            echo "Date from input field: " . $date1; // displays "Aug 25, 2014
  </code></pre>
  
  <p>How do I take the variable '$date1' and convert it into a date format so that it can be inserted into a MySQL table with a field of type "date"?</p>