Page 1 sur 1

pb affichage tableau, tout sur la meme ligne;

Posté : 14 mars 2013, 15:38
par darcos
bonjour

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">&nbsp;</td> </tr> </tfoot> </table>

Re: pb affichage tableau, tout sur la meme ligne;

Posté : 14 mars 2013, 15:43
par damien_55
C'est problème de balise html et pas de php apparement.

Revois la structure html de ton tableau et son insertion dans ton php.

Re: pb affichage tableau, tout sur la meme ligne;

Posté : 14 mars 2013, 15:57
par darcos
C'est problème de balise html et pas de php apparement.

Revois la structure html de ton tableau et son insertion dans ton php.
merci pour l'aide avant tout :)

je viens de reregarder ma structure htlml , en effet la balise TR etait mal placé .

je viens de corriger , probleme resolu.

Re: [RESOLU] pb affichage tableau, tout sur la meme ligne;

Posté : 14 mars 2013, 16:45
par damien_55
:wink: