par
Tip- » 18 déc. 2008, 18:06
Bonjour à tous,
Mon problème est assez simple, j'ai une page php comportant un tableau, malheureusement quand
j'ajoute des lignes à mon tableau, j'ai un 2ième tableau qui apparait juste en dessous du premier.
Je soupçonne la solution d'être particulièrement "conne", mais pas moyen de la trouver ,(
Voici le code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>membres inscrit</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("bdd_site_php_cours");
$reponse = mysql_query("SELECT * FROM membres");
?>
<?php
while($donnees = mysql_fetch_array($reponse))
{
?>
<table >
<tr>
<th>id</th>
<th>pseudo</th>
<th>nom</th>
<th>Prenom</th>
</tr>
<tr>
<td><?php echo $donnees['ID'];?></td>
<td><?php echo $donnees['pseudo'];?></td>
<td><?php echo $donnees['nom'];?></td>
<td><?php echo $donnees['prenom'];?></td>
</tr>
</table>
<?php
}
mysql_close();
?>
</body>
</html>
Merci d'avance pour aide.
Bonjour à tous,
Mon problème est assez simple, j'ai une page php comportant un tableau, malheureusement quand
j'ajoute des lignes à mon tableau, j'ai un 2ième tableau qui apparait juste en dessous du premier.
Je soupçonne la solution d'être particulièrement "conne", mais pas moyen de la trouver ,(
Voici le code:
[php]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>membres inscrit</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
mysql_connect("localhost", "root", "");
mysql_select_db("bdd_site_php_cours");
$reponse = mysql_query("SELECT * FROM membres");
?>
<?php
while($donnees = mysql_fetch_array($reponse))
{
?>
<table >
<tr>
<th>id</th>
<th>pseudo</th>
<th>nom</th>
<th>Prenom</th>
</tr>
<tr>
<td><?php echo $donnees['ID'];?></td>
<td><?php echo $donnees['pseudo'];?></td>
<td><?php echo $donnees['nom'];?></td>
<td><?php echo $donnees['prenom'];?></td>
</tr>
</table>
<?php
}
mysql_close();
?>
</body>
</html>
[/php]
Merci d'avance pour aide.