Yeah, timestamps are in Unix Epoch time and epoch is the number of seconds elapsed since December 31, 1969.
What you could do is:
//$date is the date from the DB in the form YYYY-MM-DD
$date = explode("-", $date);
//now $date[0]=YYYY, $date[1]=MM, $date[2]=DD
$yyyy = date("y");
$mm = date("m");
$dd = date("d");
if( $date[0] < $yyyy ){
$diff[y] = $date[0]-$yyyy;
}
elseif( $date[0] = $yyyy ){
$diff[y] = 0;
}
else{ //$yyyy is smaller than user inputted year
print "Hey! You cant be born in $date[0]!";
}
//then repeat for mm and dd.
Hope this helps!
Brad Taylor
Senior Web Producer
BradCom Industries LTD
brad_at_getcoded.net(replace at with @)