I have a form with drop downs for day month and year.
I combine them on the following page so they read YYYY/MM/DD but I can't get it to store the values in my database (MySQL).
I think it must be due to the date not being formatted correctly.
Here is what I have treid so far....
$strDateStart = date(Y, $POST['DateStart_Y']) ."/". date(m, $POST['DateStart_M']) ."/". date(d, $_POST['DateStart_D']);
Or
$strDateStart = $POST['DateStart_Y'] ."/". $POST['DateStart_M'] ."/". $_POST['DateStart_D'];
$strDateStart = date('Y-m-d',$strDateStart);
They display ok but when I add it to a new record it just shows 0000-00-00
Can anyone help please?
Many thanks, Mark