Aide - Recherche - Membres - Calendrier
Version complète : Encore Un Probleme De Tableau :o !
La Communauté TitaXium > Service Communication > Espace Developpement
Xs_013
Bonjour,
Voila, j'ai encore un probleme de tableau ohmy.gif ! Cette fois, une fois que je fais "http://127.0.0.1/LocalHost/BDD01/EmpTy-WebSite/site/index.php?p=team&membre=1",
tout marche, les infos s'affiche comme il le faut, mais, le tableau s'affiche horizontalement ! Pourriez-vous m'aider svp ?

@+,
Nico

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" >
<head>
        <title>Votre titre ici !</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link rel="shortcut icon" href="favicon.gif" type="image/ico" />
    <link rel="stylesheet" type="text/css" href="style.css" title="default" media="screen" />
<meta name="generator" content="Namo WebEditor v5.0">
</head>  
 <div id="contenu">
     <div class="cat">
   <h2>Teams</h2>
<p>
<?php
if ($page=="team" AND empty($_GET['membre'])){
?>
<table>
  <tr>
      <th>ID</th>
      <th>Pseudo</th>
   <th>Hits</th>
  </tr>
<?php
require("inc/config.inc.php");

mysql_connect($host,$username,$password);
mysql_select_db($bdd_name);

$retour = mysql_query('SELECT * FROM teams ORDER BY id DESC');
while ($donnee = mysql_fetch_array($retour))
{
?>
  <tr>
      <td><?php echo $donnee['id']; ?></td>
      <td><?php echo '<a href="?p=team&membre=' . $donnee['id'] . '">';  ?><?php echo $donnee['pseudo']; ?></a></td>
      <td><?php echo $donnee['compteur']; ?></td>
  </tr>
<?php
}
}
?>
</table>
<?php
if (isset($_GET['membre'])){
?>
<table>
<tr>
<th>Pseudo</th>
<th>Prenom</th>
<th>Age</th>
<th>Nationalité</th>
<th>E-Mail</th>
<th>MSN</th>
<th>Photo</th>
<th>Processeur</th>
<th>Carte m</th>
<th>Carte g</th>
<th>DD</th>
<th>Memoire</th>
<th>Ecran</th>
<th>souris</th>
<th>tapis</th>
<th>casque</th>
<th>connection</th>
<th>reso</th>
<th>os</th>
<th>Config</th>
<th>Steam ID</th>
</tr>
<?php
require("inc/config.inc.php");

mysql_connect($host,$username,$password);
mysql_select_db($bdd_name);

$id = $_GET['membre'];

$retour = mysql_query("SELECT * FROM teams WHERE id='$id'");
while ($donnees = mysql_fetch_array($retour))
{
  $pseudo = $donnees['pseudo'];
  $prenom = $donnees['prenom'];
  $age = $donnees['age'];
  $nationalite = $donnees['nationalite'];
  $email = $donnees['email'];
  $msn = $donnees['msn'];
  $photo = $donnees['photo'];
  $processeur = $donnees['processeur'];
  $carte_mere = $donnees['carte_mere'];
  $carte_graphique = $donnees['carte_graphique'];
  $disque_dur = $donnees['disque_dur'];
  $memoire = $donnees['memoire'];
  $ecran = $donnees['ecran'];
  $souris = $donnees['souris'];
  $tapis = $donnees['tapis'];
  $casque = $donnees['casque'];
  $connection = $donnees['connection'];
  $resolution = $donnees['resolution'];
  $os = $donnees['os'];
  $config = $donnees['config'];
  $steam_id = $donnees['steam_id'];
  $compteur = $donnees['compteur'];
}
?>
<tr>
<td><?php echo $pseudo; ?></td>
<td><?php echo $prenom; ?></td>
<td><?php echo $age; ?></td>
<td><?php echo $nationalite; ?></td>
<td><?php echo $email; ?></td>
<td><?php echo $msn; ?></td>
<td><?php echo $photo; ?></td>
<td><?php echo $processeur; ?></td>
<td><?php echo $carte_mere; ?></td>
<td><?php echo $carte_graphique; ?></td>
<td><?php echo $disque_dur; ?></td>
<td><?php echo $memoire; ?></td>
<td><?php echo $ecran; ?></td>
<td><?php echo $souris; ?></td>
<td><?php echo $tapis; ?></td>
<td><?php echo $casque; ?></td>
<td><?php echo $connection; ?></td>
<td><?php echo $resolution; ?></td>
<td><?php echo $os; ?></td>
<td><?php echo $config; ?></td>
<td><?php echo $steam_id; ?></td>
</tr>
<?php
$compteur++;
mysql_query("UPDATE teams SET compteur = '$compteur' WHERE  id='$id'");
?>
</table>
<?php
}
?>
</p>
   <p>&nbsp;</p>
     </div>
 </div>
Antoine_935
Tu n'auras qu'une seule ligne de plus, qui contiendra lse dernières informations, pour la bonne et simple raison que tu fais passer tout par les variables, et qu'il ne reste que la dernier valeur
fais plutot
Code
while(fetch_array()) {
  echo '<td>'.$fetch_data['wanted_data'].'</td>
<td>'.$fetch_data['another_wanted_data']
}

etc.
Xs_013
Bonjour,
Alors la ! Pourrais-tu m'expliquer ton codes stp ? De plus, je n'ai pas compris de quoi tu parles =)

@+,
Nico
Fantome
Si tu veux un tableau vertical il faut que tu mette
HTML
<table>
<tr>
<td>Prenom</td>
<td>$prenom</td>
</tr>
<tr>
<td>Nom</td>
<td>$nom</td>
</tr>
...
</table>
Mdz
Un conseil, met toutes tes opérations mysql avant ton body.
tyx
Citation (Mdz @ samedi 08 juillet 2006 à 12h02)
Un conseil, met toutes tes opérations mysql avant ton body.
*


Encore mieux, pas d'opération mysql dans un même fichier que du html : >
Darkthrone
Ca c'est de la solution : > ( héhé carotte le smile )
Ceci est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'informations, la mise en page et les images, veuillez cliquer ici.
Invision Power Board © 2001-2010 Invision Power Services, Inc.