I am facing a problem while calculating age saved in the database. I obtained help from a user of this site and he gave me the proper output file but i ran into anoth issue. The solution is made for newer php version but the php version i have is 5.2.6. Any help in this method will be highly appreciated. Here is the code he provided me
if(!empty($row11['dob'])){
$birthdate = new DateTime($row11['dob']);
$today = new DateTime('today');
$ag = $birthdate->diff($today)->y;
$mn = $birthdate->diff($today)->m;
$dy = $birthdate->diff($today)->d;
}else{
$ag = 0; $mn=0; $dy=0;
}
I am also attaching the original file so that you can help me better. Please do note that i am using php 5.2.6 for this purpose. Any prompt help in this regard will be highly appreciated. Thanks
Here is the link to Original File