- 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]));
guest 10.08.2013 21:16 # 0
guest 10.08.2013 22:42 # −2
Tairesh 14.08.2013 09:11 # 0
nonamez 14.08.2013 17:14 # 0