|
BEWARE OF SCAMMERS ASKING FOR ADMIN ACCESS. WE NEVER ASK FOR ACCESS.
| Author |
Message |
Please Register and Login to this forum to stop seeing this advertsing.
|
|
|
|
 |
Josh

|
Age Updating Script |
|
| Code: | <?php
// Calculate the age from a given birth date
function GetAge($Birthdate)
{
// Explode the date into meaningful variables
list($BirthYear,$BirthMonth,$BirthDay) = explode("-", $Birthdate);
// Find the differences
$YearDiff = date("Y") - $BirthYear;
$MonthDiff = date("m") - $BirthMonth;
$DayDiff = date("d") - $BirthDay;
// If the birthday has not occured this year
if ($DayDiff < 0 || $MonthDiff < 0)
$YearDiff--;
return $YearDiff;
}
echo "" . GetAge("YEAR-MONTH-DAY"). " .";
?>
|
If you was born in 1983 or something like that it would be then the February would be 02 then day 22
1989-02-22
Hope you like this 
|
|
| Tue Apr 28, 2009 9:09 am |
|
 |
Speed


|
|
|
Nice man
_________________
Train Insane or Remain The Same
There's No Room In A Warriors Heart For Self Doubt |
|
| Tue Apr 28, 2009 5:38 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|