I'm have some difficulty recording a date into a database from a fomr text field.
I have a form that contains a field named 'sDate'.
This form is submitted to 'page2' and then re-formatted to suit the date mask "0000-00-00"
i.e.
Code: Select all
$sDate = date("Y-m-d", strtotime($_POST['sDate'])); //THIS IS THE VALUE THAT WILL BE RECORDED IN DBIt is recorded into the db like this: yyyy-mm-dd
My problem is that it keeps going wrong!!!
e.g. I entered the date "25/04/1982" and it was recorded like this: "1984-01-04"
Any ideas?