I'm having a problem with this age calculation script. It doesn't go back further than 1970. I'm new at PHP still. Any ideas on how to fix it?
Age formats are 2-25-1984.
function calc_age($month, $day, $year) {
$stampmebaby =getdate(time());
$day1= $stampmebaby[mday];
$month1=$stampmebaby[mon];
$year1=$stampmebaby[year];
$now = mktime(0, 0, 0, $month1, $day1, $year1);
$then = mktime(0, 0, 0, $month, $day, $year);
$userage = ($now - $then) / 31536000;
$userage = number_format($userage);
echo $userage;
}
Thanks.