Jump to content

help storing dat of birth


MDanz

Recommended Posts

how do i store date of birth into mysql.  I have mysql field type as DATE.

 

I tried this but not working..

 

$date = $yearOfBirth.'-'.$monthOfBirth.'-'.$dateOfBirth;

$prof = "INSERT INTO Profile";
      $prof .= "(`username`,`location`,`gender`,`dateofbirth`,`information`) VALUES ('$username','$location','$gender',$date,'$about')";
$profresults = mysql_query($prof)or die (mysql_error());

 

the date shows as 0000-00-00

Link to comment
https://forums.phpfreaks.com/topic/209626-help-storing-dat-of-birth/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.