Date picker UK date to database
I have adjusted the code in the date picker to display the date in the date picker as a UK Date
How do I change this code to change the date to a MYSQL friendly date format to insert it into the database?
<?php echo ((isset($_POST["albumDate"]) && $_POST["albumDate"]!="" )?date("Y-m-d H:i:s", strtotime($_POST["albumDate"])):""); ?>
This code unfortunately posts the date from d/m/Y into Y-d-m rather than Y-m-d