I have date of birth fields in a table defined as varchar data - year,
month and day - these are defined as varchar data because the user
selects them from a dropdown listbox.
I can't get the Gregorian To juilan date funtion to produce anything
except 0 - it's the 3 arguments: month, day, year - they need to be
integers so I use intval() to convert each one and then feed that into
the Gregorian function but I still get 0 as the results - if I hard
code the 3 arguments in as (10,20,195) then it works - why won't the
integer conversion function work???
$php_SQL = "SELECT * FROM personal";
$php_resultID = mysql_query($php_SQL, $php_linkID);
$php_row = mysql_fetch_object($php_resultID);
$php_dob_year = $php_row->dob_year;
$php_dob_month = $php_row->dob_month;
$php_dob_day = $php_row->dob_day;
$month = intval($php_dob_month);
$day = intval($php_dob_day);
$year = intval($php_dob_year);
$jd = GregorianToJD ($month,$day,$year);
print "<BR>$jd";