My form inputs a date as dd/mm/yyyy, however my database uses a yyyy-mm-dd format. How do I flip the dates into the database format along with the difference of '/' and '-'?
$first_date = $_REQUEST["date_1"];
You can simply use:
$date = date('Y-m-d H:i:s', strtotime($first_date);
You can use PHP's datetime class:
$dateTime = new DateTime($first_date); $dateTime = $dateTime->format('Y-m-d');