[Tableaux] Centrer echo ?
Salut
Ca peut parraître fou , mais je n'arrives pas a centrer mon echo,voici mon code :
Code:
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 57 58 59 60 61 62 63 64 65 66 67
| <body link="blue" vlink="#006633" >
<p align="center" > <u> Recherche </u><br> <br>
Recherche par <b> description </b> <br> <br>
<?php
$SAISIE=$_COOKIE["saisie"];
$TYPE=$_COOKIE["type"];
$CHAMP=explode(" ",$SAISIE);
$COMPTEUR_MOTS=count($CHAMP); echo "<br>";
?>
<table border="2" bgcolor="#339933" align="center" cellspacing="2" cellpadding="3" height="1%" width="79%">
<tr bgcolor="white">
<th>ID</th>
<th>Nom Note</th>
<th bgcolor=yellow>Description</th>
<th>Date</th>
<th>Lien</th>
</tr>
<?php
// on se connecte à MySQL
$db = mysql_connect('localhost', '', '');
// on sélectionne la base
mysql_select_db('intranet',$db);
// on crée la requête SQL
$sql="SELECT id_note,titre,description,date_note,lien FROM note WHERE";
for ($i=0; $i<count($CHAMP) ;$i++)
{
$sql=$sql." description LIKE '%".$CHAMP[$i]."%' and type_note='".$TYPE."' " ;
if($i+1<count($CHAMP))
{$sql=$sql." OR ";}
}
// on envoie la requête
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
$total = mysql_num_rows($req);
// on fait une boucle qui va faire un tour pour chaque enregistrement
while($data = mysql_fetch_array($req))
{
// on affiche les informations de l'enregistrement en cours
echo '<tr bgcolor="white">';
echo '<td>'.$data["id_note"].'</td>';
echo '<td>'.$data["titre"].'</td>';
echo '<td bgcolor=yellow>'.$data["description"].'</td>';
echo '<td>'.$data["date_note"].'</td>';
echo '<td> <a href="'.$data["lien"].'" > Telechargez! </a> </td>';
echo '</tr>';
}
// on ferme la connexion à mysql
mysql_close();
echo "Pour la description de la note saisie : <b>".$SAISIE."</b> , vous avez <b>".$total. "</b> résultat(s) dans le tableau ci dessous :" ."<br><br>" ;
?>
</table>
<br> <br>
<a href="Recherche"style="text-decoration:none;color:red"
onMouseOver="window.status='';return true"> <b>Retour</b></a>
<br>
 
</p>
</body>
</html> |
Cordialement,