calculate person's birthdate using age
Posted: Thu May 28, 2009 1:13 am
is it possible to compute the birthdate of person using age??
can anyone help me on this..thanks....
can anyone help me on this..thanks....
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
We can get one's birth year using his age. not birth day. But there might be some chances of error as well.chelflores wrote:is it possible to compute the birthdate of person using age??
can anyone help me on this..thanks....
Code: Select all
$age = $_POST['age']; // Age of the user
$Time_Passed_Since_He_Was_Born = 60*60*24*365*$age; // Present time minus time since he was born. 60 sec * 60 min * 24 hrs * 365 days * his age.
$Year_Of_Birth = time() - $age;
echo date("Y", $Year_Of_Birth);