I believe you want to calculate the age if teh date of birth is given:
If that is the case you can use the following function:
function persons_age($year, $month, $day)
{
//list($year, $month, $day) = split('[-.]', $BirthDate);
$tmonth = date('n');
$tday = date('j');
$tyear = date('Y');
$years = $tyear - $year;
if ($tmonth <= $month)
{
if ($month == $tmonth)
{
if ($day > $tday)
$years--;
}
else
$years--;
}
return $years;
}