Bonjour j'aimerais que sur mon site en php l'age soit calculé automatiquement grace a la date de naissance, je suis debutant, et malgres les codes que j'ai trouver sur votre site je n'ai reussi a en adapté aucun.
voila le code de ma page :
[quote]
<?php
echo '
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="center" style="border-top-width:1px; border-top-style:solid; border-top-color:#3399FF; border-bottom-width:1px; border-bottom-style:solid; border-bottom-color:#3399FF">
<h2>Le Staff</h2>
</td>
</tr>
</table>
<table>
<tr>
<td height="15"></td>
</tr>
</table>
<div id="corps">';
$sql = "SELECT * FROM staff ORDER BY id_staff";
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
while ( $data = mysql_fetch_array($req) )
{
echo '
<table cellpadding="0" cellspacing="2" border="0" width="80%" align="center">
<tr>
<td class="box">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center" class="texte">
<tr>
<td align="center"><b>Nom : '.$data['nom'].'</b></td>
</tr>
<tr>
<td align="center" width="30%"><img src="'.$data['image'].'" border="0" alt="'.$data['image'].'" width="120" height="118" /></td>
<td align="left"> <b><u>Age</u></b> : '.$data['age'].'<br /> <b><u>Ville</u></b> : '.$data['ville'].'<br /> <b><u>Fonction(s)</u></b> : '.$data['fonction'].'<br /> <b><u>Email</u></b> : <a href="mailto:'.$data['email'].'">'.$data['email'].'</a><br /> <b><u>Site Web</u></b> : <a href="'.$data['site'].'" target="_blank">'.$data['site'].'</a><br /></td>
</tr>
<tr>
<td height="3"></td>
</tr>
</table>
</td>
</tr>
</table>';
}
echo '</div>';
?>
[/quote]