- 1
- 2
- 3
- 4
- 5
- 6
$birthDate = "".($_POST['birthday'])."";
//explode the date to get month, day and year
$birthDate = explode("/", $birthDate);
//get age from date or birthdate
$age = (date("md", date("U", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date("md") ? ((date("Y")-$birthDate[2])-1):(date("Y")-$birthDate[2]));
Комментарии (4) RSS
Добавить комментарий