Pb affichage tableau HTML
Résolu
godLike
Messages postés
259
Date d'inscription
Statut
Membre
Dernière intervention
-
godLike Messages postés 259 Date d'inscription Statut Membre Dernière intervention -
godLike Messages postés 259 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Voilà j'ai fait un script pour afficher une liste de joueurs avec ce code :
<?php
include('hrs_bloc1.html');
?>
<table>
<tr>
<td>Modifier</td>
<td>Pseudo</td>
<td>Classe</td>
<td>Grade</td>
</tr><br/>
<?php
include('connex.php');
mysql_connect("$server", "$user", "$passwd");
mysql_select_db("$base");
$req=mysql_query('SELECT * FROM user');
while ($res = mysql_fetch_array($req))
{
?>
<tr>
<td><a><?php echo '<a href="modifier_membre.php?modifier_membre=' . $res['id_user'] . '">'; ?><img src="images/crayon.gif"></a></td>
<td><?php echo $res['login_user']; ?></td> |
<td><?php echo $res['class_user']; ?></td> |
<td><?php echo $res['grade_user']; ?></td> |
</tr>
<?php
}
?>
</table>
<?php
include('hrs_bloc2.html');
?>
Donc ça affiche correctement tous les joueurs de ma base, mais ça me fait un tableau dans ce genre : (les valeurs du tableau ne sont que des valeurs de test, l'affichage du message n'aligne pas bien les colonnes du tableau mais chez moi c'est bien affiché)
| | | | | | | | | | | | | | | | | | | | |
Modifier Pseudo Classe Grade
Chaman
c Chaman
qzd Chaman
qzd Chaman
salut Chaman
qzdqzd Chaman
qzdqzd Chaman
Je ne comprends pas pourquoi il y a affiché les : |||||||||||||||||||||||||||| avant le tableau ..
On peut tromper 1 fois 1000 personnes, mais on ne peut pas tromper 1000 fois 1 personne.
Voilà j'ai fait un script pour afficher une liste de joueurs avec ce code :
<?php
include('hrs_bloc1.html');
?>
<table>
<tr>
<td>Modifier</td>
<td>Pseudo</td>
<td>Classe</td>
<td>Grade</td>
</tr><br/>
<?php
include('connex.php');
mysql_connect("$server", "$user", "$passwd");
mysql_select_db("$base");
$req=mysql_query('SELECT * FROM user');
while ($res = mysql_fetch_array($req))
{
?>
<tr>
<td><a><?php echo '<a href="modifier_membre.php?modifier_membre=' . $res['id_user'] . '">'; ?><img src="images/crayon.gif"></a></td>
<td><?php echo $res['login_user']; ?></td> |
<td><?php echo $res['class_user']; ?></td> |
<td><?php echo $res['grade_user']; ?></td> |
</tr>
<?php
}
?>
</table>
<?php
include('hrs_bloc2.html');
?>
Donc ça affiche correctement tous les joueurs de ma base, mais ça me fait un tableau dans ce genre : (les valeurs du tableau ne sont que des valeurs de test, l'affichage du message n'aligne pas bien les colonnes du tableau mais chez moi c'est bien affiché)
| | | | | | | | | | | | | | | | | | | | |
Modifier Pseudo Classe Grade
Chaman
c Chaman
qzd Chaman
qzd Chaman
salut Chaman
qzdqzd Chaman
qzdqzd Chaman
Je ne comprends pas pourquoi il y a affiché les : |||||||||||||||||||||||||||| avant le tableau ..
On peut tromper 1 fois 1000 personnes, mais on ne peut pas tromper 1000 fois 1 personne.
A voir également:
- Pb affichage tableau HTML
- Tableau word - Guide
- Tableau ascii - Guide
- Trier un tableau excel - Guide
- Tableau croisé dynamique - Guide
- Editeur html - Télécharger - HTML
2 réponses
Voila j'ai enlevé le <br/> et j'ai fixé la largeur de tes cellules ainsi que de ton tableau essaie:
<?php
include('hrs_bloc1.html');
?>
<table width="600">
<tr>
<td width="150">Modifier</td>
<td width="150">Pseudo</td>
<td width="150">Classe</td>
<td width="150">Grade</td>
</tr>
<?php
include('connex.php');
mysql_connect("$server", "$user", "$passwd");
mysql_select_db("$base");
$req=mysql_query('SELECT * FROM user');
while ($res = mysql_fetch_array($req))
{
?>
<tr>
<td><a><?php echo '<a href="modifier_membre.php?modifier_membre=' . $res['id_user'] . '">'; ?><img src="images/crayon.gif"></a></td>
<td><?php echo $res['login_user']; ?></td> |
<td><?php echo $res['class_user']; ?></td> |
<td><?php echo $res['grade_user']; ?></td> |
</tr>
<?php
}
?>
</table>
<?php
include('hrs_bloc2.html');
?>
<?php
include('hrs_bloc1.html');
?>
<table width="600">
<tr>
<td width="150">Modifier</td>
<td width="150">Pseudo</td>
<td width="150">Classe</td>
<td width="150">Grade</td>
</tr>
<?php
include('connex.php');
mysql_connect("$server", "$user", "$passwd");
mysql_select_db("$base");
$req=mysql_query('SELECT * FROM user');
while ($res = mysql_fetch_array($req))
{
?>
<tr>
<td><a><?php echo '<a href="modifier_membre.php?modifier_membre=' . $res['id_user'] . '">'; ?><img src="images/crayon.gif"></a></td>
<td><?php echo $res['login_user']; ?></td> |
<td><?php echo $res['class_user']; ?></td> |
<td><?php echo $res['grade_user']; ?></td> |
</tr>
<?php
}
?>
</table>
<?php
include('hrs_bloc2.html');
?>