voila , je suis nouveau en Php et j'ai un probleme avec l'affichage d'un tableau.
mes resultats s'affiches certes mais tous sur une sur la meme ligne ?!
merci d'avance pour l'aide
voici la partie Code Php :
Code : Tout sélectionner
<table id="rounded-corner" summary="List of Employees">
<thead>
<tr>
<th scope="col" class="rounded">Post</th>
<th scope="col" class="rounded">Name</th>
<th scope="col" class="rounded">HR State</th>
<th scope="col" class="rounded">CRM Log</th>
<th scope="col" class="rounded">FingerPrint Log</th>
<th scope="col" class="rounded">Mobile Number</th>
<th scope="col" class="rounded">Site</th>
<th scope="col" class="rounded">Department</th>
<th scope="col" class="rounded-q4">Activity</th>
</tr>
</thead>
<tbody>
<tr>
<?php
$cpt = 0;
$sql = "SELECT ID,Name, Post, HR_STATE, Crm_Log, FingerPrint_Log, Mobile_Number_1, Site, Department, Activity FROM tbl_employeefile ORDER BY Name" ;
//exécution de la requête:
$requete = mysql_query($sql) or die ("Can't find the Results ! "); ;
//affichage des données:
while( $result = mysql_fetch_Object ($requete))
{
echo '<td>'.$result->Post.'</td>';
echo '<td>'.$result->Name.'</td>';
echo '<td>'.$result->HR_STATE.'</td>';
echo '<td>'.$result->Crm_Log.'</td>';
echo '<td>'.$result->FingerPrint_Log.'</td>';
echo '<td>'.$result->Mobile_Number_1.'</td>';
echo '<td>'.$result->Site.'</td>';
echo '<td>'.$result->Department.'</td>';
echo '<td>'.$result->Activity.'</td>';
$cpt++;
}
?>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="rounded-foot-left"><em>Total employees : <?php echo $cpt; ?></em></td>
<td class="rounded-foot-right"> </td>
</tr>
</tfoot>
</table>