title: Converting String to Date before submitting MySQL
body: <p>I've been trying to convert a string date into a date field in MySQL.
  It is more user friendly on the client side to submit as a string.</p>
  
  <p>Here's what I have so far on the php side:</p>
  
  <pre><code>$fullname = $_POST['fullname'];
  $dateofdeath = $_POST['dateofdeath'];
  $date = STR_TO_DATE('$dateofdeath','%d,%m,%Y');
  $sql = "INSERT INTO FRSLNamelist (fullname,dateofdeath) VALUES ('$fullname','$date')";
  </code></pre>
  
  <p>I'm getting - <code>Fatal error: Call to undefined function STR_TO_DATE()</code></p>
  
  <p>both fields are submitted as text.</p>
  
  <p>I have had a good search of google and stackoverflow, but they are mostly to do with query and convert rather than convert then submit. </p>
  
  <p>Cheers to anyone that can help.</p>