Dear admin,

The following should fix the age problem within the script. At present it uses the year to figure out a users age, with this it will use the full date of birth to work out and display the age.

------------------------------------------------------------

In the include/function.php page add the following at the footer:

function insert_userage($a)
{
global $conn;
$sql="SELECT bdate,(YEAR(CURRENT_DATE) - YEAR(bdate)) - (DATE_FORMAT(CURRENT_DATE, '%d%m') < DATE_FORMAT(bdate, '%d%m')) AS userage FROM signup WHERE UID=$_REQUEST[UID]";
$rs=$conn->execute($sql);
return $rs->fields[userage];
}
Next in the templates/user.tpl change:

{if $user_info[0].bdate ne "0000-00-00"}
<TR>
<TD>Age:</TD>
<TD>{$profileage}</TD>
</TR>
{/if}
To:

{if $answers[0].bdate ne "0000-00-00"}
<TR>
<TD>Age: {insert name=userage assign=user_age}</TD>
<TD>{$user_age}</TD>
</TR>
{/if}
-------------------------------------------------------------------

I'm about 95% sure that this will fix the current age problems within the script, however because the function.php page is encrypted I can not test this.

If sucessful please could you upload the patched files so that we can correct our profiles page and give us a mention.

Regards,
Mathew Rennie.