Am trying to insert date to a MYSQL column with datatype DATE . the following code is used.
$expiry = date("Y-m-d H:i:s", $_POST['expiry']);
but the mysql column shows 01-Jan-70 12:00:00 AM
. have also used strtotime()
but it seems to insert NULL.
The html input takes YYYY-MM-DD
as date format input
any help appreciated.