Hi, I'm trying to collect a users date of birth when they register but am struggling to send it to the database in the correct format (or any format!). This is what I have:
Code: Select all
$dob_eploded = explode("/", $dob);
$dob_timestamp = mktime(0,0,0,$dob_eploded[0], $dob_eploded[1], $dob_eploded[2]);
$dob is the value they sent in the format dd/mm/yyyy. The database stores them in the this format: 0000-00-00 00:00:00.
When the mysql query with $dob_timestamp is sent there's no error, the database just isn't updating.
Thanks,
Geoff