title: PHP mysqli insert date from string
body: <p>Im getting sick of all that date stuff.
  This is what I try:</p>
  
  <pre><code>$string         = '24/10/1985';
  $bday           = explode('/', $string);
  $insertbday     = $bday[2] . '-' . $bday[1] . '-' . $bday[0];
  $insertbday     = date("Y-m-d", $insertbday);
  mysqli_query($con, "INSERT INTO user (bday) VALUES ($insertbday)");
  </code></pre>
  
  <p>But ofc there is 0000-00-00 then. How to do this right?</p>