Hi guys... just a quick question.
so i have a form, where all users will input a date in format DD/MM/YYYY
i want to convert this into YYYY/MM/DD and then insert it into the mysql database.
this is the code i have created for the rearranging of the date:
<?php
$pieces = explode("/", $_POST[eta]);
$predate = $_POST[eta];
$datey = echo('$pieces[2]-$pieces[0]-$pieces[1]');
echo "English date: $predate <br>";
echo "MySQL date: $datey";
?>
my problem is, that, as you can see on line 4 i am trying to get all of the pieces of the exploded date into one variable,,,, but i am recieving a parse error.
can anyone help? Thanks.