I am trying to retrieve the date of birth from users once they submit the form and update the date type, but I am unable to update the date type. Can you tell me what I am doing wrong?
if($_POST){
$dob = date('Y-m-d',strtotime($_POST['year']."-". $_POST['month']."-".$_POST['day']));
$retur = $userObj->updateProfile($dob);
}
public function updateProfile($dob){
$db = db_mysql::getInstance();
$qr = $db->query("UPDATE ".USERS." SET dob = $dob WHERE id = '".$udata."'") or die(mysql_error());
return $udata;
}