I have an input field in my html page that gets Date from jQuery datepicker.
The format looks like this:
18/02/2017
I have a MYSQL field which is DATETIME
I need to insert the Date above into this MYSQL field.
So i tried this code:
$mysqlDate = date('Y-m-d H:i:s', strtotime($_POST['php_date']));
but the result of $mysqlDate
is this:
1970-01-01 01:00:00
Could someone please advise on this issue?
Thanks in advance.