members over 34??


#1

Hi guys,

I wonder if someone could help me out please (scratching my head).

On my site i have profiles showing the age of my members, but if my members are over 34, they stay at 34 and their ages are never show any highter. Now i think this is because i use the mktime and obviously the start of time is 00.00 1970 for the unix time, hence the 34, but there must be either another piece of code or stystem to work out ages over 34.

Here is my code:

// first get the current date
$nowdate = mktime(0,0,0,date(“m”),date(“d”),date(“Y”));
// this is my birthday
$birthday = mktime(0,0,0,$vdobmonth,$vdobday,$vdobyear);
// calculate my age in years
$age=intval(($nowdate-$birthday)/(606024*365));

$result1 = mysql_query(“SELECT DISTINCT * FROM session WHERE userid=$viewuserid”);
$vOnline = mysql_num_rows($result1);

Please bare in mind, i’m not a very good php scripter and had a lot of help creating my site…so please, in laymans terms PLEASE.

Thanks guys,

soulman