Bonjour voila mon problème j'ai fait un petit site qui fait que lorsque l'on clique sur un des bouton ou que l'on lance une recherche cela m'affiche mes résultats dans un tableau mais là problème les entêtes se répète a chaque résultat. Voici le code
Ce que j'aimerais c'est qu'il n'y ait qu'une seule entête pour tout les résultats pour alléger l'affichage d'une et parce que j'ai l'intention de rendre les entêtes cliquable pour effectuer des tris.J'ai essayer différentes façon pour mes entêtes comme mettre les entete avant le while pour pas quel se répéte mais j'obtiens un magnifique escalier avec mes images(que j'ai mis dans un second tableau pr facilter l'alignement et l'affichage peut etre que c'est ce qui m'empeche de faire ce que je veux non?).
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 <? if (mysql_num_rows($mysql_result) > 0){ while($row=mysql_fetch_array($mysql_result)) { ?> <body bgcolor="white"> <table width="100%" border="1" bordercolor="#900" cellpadding="0" cellspacing="0" bgcolor="white" align="center"> <!--DWLayoutTable--> <tr> <th width="15%" height="23"></th> <th width="20%">Marque</th> <th width="30%">Modele/Energie</th> <th width="8%">Prix</th> <th width="10%">Km</th> <th width="8%">Année</th> <th width="7%">Plus</th> </tr> <tr> <td width="166" rowspan="6" valign="middle"><table width="100%" border="1"> <tr> <td valign="top"><font size="3" face="Comic Sans MS"><a href="<? print($row["photo"]);?>"><img src="<? print($row["photo"]);?>" width="77" height="55" border="1" alt="" align="center" /></a></font></td> <td><font size="3" face="Comic Sans MS"><a href="<? print($row["photo1"]);?>"><img src="<? print($row["photo1"]);?>" width="77" height="55" border="1" alt="" align="center"/></a></font></td> </tr> <tr> <td><font size="3" face="Comic Sans MS"><a href="<? print($row["photo3"]);?>"><img src="<? print($row["photo3"]);?>" width="77" height="55" border="1" alt="" align="center"/></a></font></td> <td><font size="3" face="Comic Sans MS"><a href="<? print($row["photo2"]);?>"><img src="<? print($row["photo2"]);?>" width="77" height="55" border="1" alt="" align="center" /></a></font></td> </tr> </table></td> <td height="155" align="center"><h5>Marque : <? print($row["marque"]);?></h5> <h5><a href="mailto:garage-bujon-blessac@wanadoo.fr?subject=Réservation du véhicule de marque<? print($row["marque"]);?> Modèle : <? print($row["modele"]);?> Prix: <? print($row["prix"]);?>euros&body=Merci d'inscrire vos coordonnées dans ce mail">Réservez ce véhicule</a></h5></td> <td height="155" align="center"><p>Modèle: <? print($row["modele"]);?></p> <p>Energie:<? print($row["carburant"]);?></p></td> <td height="155" align="center"><? print($row["prix"]);?> €</td> <td height="155" align="center"><? print($row["kilometre"]);?></td> <td height="155" align="center"><? print($row["misecircu"]);?> </td> <td align="center"><a href="fiche.php?sel=<? print($row["id"]);?>" target="_blank"><strong><em><font size="-1">Voir la fiche véhicule</font></em></strong></a><br /></td> </tr> </table> <? } } else { echo '<body bgcolor="white" text="black">'; echo "<h5 align='center'>Désolé, il n'y a aucun véhicule correspondant à vôtre demande</h5>"; } ?> </body> </html>
Merci d'avance
Partager