Probléme d'affichage des résultats

KOKOLO -  
 KOKOLO -
Bonjour,

J'ai un problème d'affichage...

Voila, lorsque j'ai que une entree dans la base, cela s affiche correctement, mais dès que j ajoute une deuxieme entree cela affiche le résultat n'importe comment : démo : http://www.voilou.fr/loteriesTEST2.php

Je comprends pas pourquoi le premier tableau est correctement placé et le second se met tout en bas...?!!

Je fais un copier coller de toute ma page :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link type="text/css" rel="stylesheet" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Description" content="Retrouvez tous les jeux concours et loteries en ligne sur Voilou.fr !">
<meta name="Keywords" content="jeu, jeux, jeu concours, jeux concours">
<meta name="Content-language" content="fr">
<style type="text/css">
<!--
a:hover {
	color: #FFFF99;
}
#Layer1 {
	position:absolute;
	left:494px;
	top:38px;
	width:359px;
	height:36px;
	z-index:1;
	background-color: #0A70A1;
}
.Style1 {color: #CC9900}
.Style2 {
	color: #3366CC;
	font-weight: bold;
}
.Style4 {color: #FFFF00}
.Style5 {color: #FFFFFF}
-->
</style><title>Voilou.fr - Gagnez des cadeaux avec les loteries en ligne !</title></head>

<body>
<table width="756" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td style="background:url(images/header.jpg) top left no-repeat " valign="top" height="181">
		<table width="705" border="0" cellspacing="0" cellpadding="0" style="margin:50 0 0 38px">
		  <tr>
			<td valign="top" width="493"><a href="http://www.histats.com" target="_blank"></a></td>
			<td width="210" height="75" valign="top">
				<div class="top" style="margin:1 0 2 0px"><!-- Search Google -->
<center>
<form method="get" action="https://www.google.com/webhp" target="google_window">
<table bgcolor="#477396">
<tr><td height="24" align="left" valign="top" nowrap="nowrap" bgcolor="#025682">

<label for="sbi" style="display: none">Entrez les termes que vous recherchez.</label>
<input name="q" type="text" class="fondblanc" id="sbi" value="" size="20" maxlength="255">
</input>
<label for="sbb" style="display: none">Envoyer un formulaire de recherche</label>

<input name="sa" type="submit" class="textegoogl" id="sbb" value="Recherche Google">
</input>
<input type="hidden" name="client" value="pub-5529470766193129"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="fr"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
<?php
include("menus/menusitemap.php"); // on appelle le fichier
?>
    </span><br style="line-height:9px">	
    <br style="line-height:6px ">
  </div>
</div>		</td>
		  </tr>
		</table>
  	    <?php
include("menus/menuhaut.php"); // on appelle le fichier
include("header/loteries.php");
include("menus/menugaucheloteriesTEST.php"); // on appelle le fichier
?>
			<td width="12" style="background:url(images/line1.gif) top left repeat-y "><img src="images/spacer.gif" alt=""></td>
			<td valign="top"><div class="fondbleu" style="margin:10 0 0 5px"><img src="images/arrow1.jpg" alt="" align="bottom" style="margin:0 9 0 0px "><strong>SECTION LOTERIES ET JEUX CONCOURS</strong></div>
			   
			    <br><div align="center">
			  <?php 

include ('dbconnect.php'); 
 
$pseudo = $_SESSION['pseudo'];  
 
// on crée la requete SQL
$sql = "select * from ";
$sql.= "listeconcoursArgent left join confirmeconcoursargent ";
$sql.= "on listeconcoursArgent.idccargent = confirmeconcoursargent.idccargent2 ";
$sql.= "and confirmeconcoursargent.pseudo='".$pseudo."' ";
$sql.= "where confirmeconcoursargent.pseudo is null";
 
// on envoie la requête

$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); 

if (!$req)
{
	echo "query = ".$sql."\n";
	echo "mysql_errno = ".mysql_errno($link)."\n";
	echo "mysql_error = ".mysql_error($link)."\n";	
	exit;
} 
session_start();
if (mysql_num_rows($req) > 0 & session_is_registered('id')==true) 
{

	// on fait une boucle qui va faire un tour pour chaque enregistrement
	while($data = mysql_fetch_array($req)) 
    	{	
        	echo ' <br><div align="center">
			  <table width="534" height="44" border="1">
                <tr>
                  <td width="410" height="38">'.$data['nomconcoursargent'].'</td>
                  <td width="107"><div align="center">'.$data['plusinfo'].'</div></td>
                </tr>
              </table>
			  <table width="534" border="1">
                <tr>
                  <td width="155" height="145">Lots mis en jeu : </td>
                  <td width="354"><ul><li>'.$data['jeuxconcoursargent'].'</li></ul>
                  <br>
                  </td>
                </tr>
              </table>			  
			  <table width="534" border="1">
                <tr>
                  <td width="522"><div align="center"><form action="'.$data['lienconcoursargent'].'" 	method="post">
		<input type="submit" class="fondblanc" value="Participer à ce jeu concours">
		</form></td>
		<td width="280"><div align="center">
		<form action="supconcoursargent.php" 	method="post">
		<input name="idccargent" type="hidden" value="'.$data['idccargent'].'">
		<input name="pseudo" type="hidden" value="'.$pseudo.'">
		<input type="submit" class="fondblanc" value="Effacer ce jeu concours de mon compte">
		 </form></div></td>
                </tr>
              </table></div><br>
					  <tr>
        	            <td colspan="2"><div align="center">
	        </div></td><br>
                  </tr>
                </table>';
 	  }   
}

else
{
while($data = mysql_fetch_array($req))
{
	echo ' <br><div align="center">
			  <table width="534" height="44" border="1">
                <tr>
                  <td width="410" height="38">'.$data['nomconcoursargent'].'</td>
                  <td width="107"><div align="center">'.$data['plusinfo'].'</div></td>
                </tr>
              </table>
			  <table width="534" border="1">
                <tr>
                  <td width="155" height="145">Lots mis en jeu : </td>
                  <td width="354"><ul><li>'.$data['jeuxconcoursargent'].'</li></ul>
                  <br>
                  </td>
                </tr>
              </table>			  
			  <table width="534" border="1">
                <tr>
                  <td width="522"><div align="center"><form action=membres/index.php 	method="post">
		<input type="submit" class="fondblanc" value="Cliquez ici pour participer à ce jeu concours"> 
		</form>
		</div></td>
                </tr>
              </table></div><br>
					  <tr>
        	            <td colspan="2"><div align="center">
	        </div></td><br>
                  </tr>
                </table>';
}
}
// on ferme la connexion à mysql
mysql_close();
?>  </div><br>
			  </td>
	<td width="14" style="background:url(images/line1.gif) top left repeat-y "></td>
  <?
  include("footerloteries.php"); // on appelle le fichier
?>
  </tr>
</table>

</body>
</html>


Merci de m'éclaircir
Jo

9 réponses

Dalida Messages postés 7114 Date d'inscription   Statut Contributeur Dernière intervention   923
 
salut,

édite le code source de la page dont tu donnes le liens, ligne 143 :
<td width="107"><div align="center"><a href=''http://www.test.fr''>Plus d''infos</a></div></td>

autour de 'http://www.test.fr' ce ne sont pas des guillemets mais un double apostrophe.

je ne sais pas si c'est ça qui met le bronx mais il faut en premier l'enlever !
0
KOKOLO
 
Bonjour Dalida,

Merci mais cela ne vient pas de la visiblement...
0
Dalida Messages postés 7114 Date d'inscription   Statut Contributeur Dernière intervention   923
 
oui mais commence par le corriger qu'on puisse passer à la suite !
-:op
0
KOKOLO
 
Bonjour,

C'est recorrigé :-)
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
KOKOLO
 
Bonjour,

Je précise aussi que si j enlève la seconde entrée de la base de donnée, en bas de page il y a bien le footer qui s affiche, mais la aussi, avec la deuxieme entree ca n affiche meme plus le footer

<?
include("footerloteries.php"); // on appelle le fichier
?>

....Si ca peut aider...
0
Dalida Messages postés 7114 Date d'inscription   Statut Contributeur Dernière intervention   923
 
mais tu fais les championnats du monde d'insertion de tables, non ?!
-:op

t'es deux '<div>' ne sont pas dans la même cellule, c'est inextricable ton code.
et qu'est ce que fait une deuxième DTD en bas de page ?
pour ton 'include()' tu as collé un doc entier ?
0
KOKOLO
 
Bonjour,

desole je suis pas un pro...:-( A chaque fois qu il y a une cellule il faut bien mettre <table> non ?

Que veut tu dire par DTD? Tu veux parler de la condition else?

Dans le include il y a

 <tr>
    <td valign="top" style="background:url(images/bot.gif) top left no-repeat " height="74">
		<table width="685" border="0" cellspacing="0" cellpadding="0" style="margin:19 0 0 24px ">
		  <tr>
			<td valign="top" class="bot"><div align="center"> </div></td>
		  </tr>
		</table>
		<div style="margin:5 0 0 23px; font-size:11px; font-family:verdana;">
		  <div align="center"><img src="images/bot_pic.gif" alt="loteries et jeux concours" align="bottom" style="margin:0 6 -2 0px">Voilou.fr © Copyright 2007. All Rights Reserved - <A HREF="" onClick="window.open('/legal.html','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=360, height=230');return(false)">Mentions Légales</A><br />
</div></div><br />	</td>
</body>
</html>
0
Dalida Messages postés 7114 Date d'inscription   Statut Contributeur Dernière intervention   923
 
non.
tout à l'heure il y avait ça :
	<td width="14" style="background:url(images/line1.gif) top left repeat-y "></td>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>footer</title>
</head>
<body>
 <tr>
    <td valign="top" style="background:url(images/bot.gif) top left no-repeat " height="74">
		<table width="685" border="0" cellspacing="0" cellpadding="0" style="margin:19 0 0 24px ">
		  <tr>
			<td valign="top" class="bot"><div align="center">&nbsp;</div></td>
		  </tr>
		</table>
		<div style="margin:5 0 0 23px; font-size:11px; font-family:verdana;">
		  <div align="center"><img src="images/bot_pic.gif" alt="loteries et jeux concours" align="bottom" style="margin:0 6 -2 0px">Voilou.fr &copy; Copyright 2007. All Rights Reserved - <A HREF="" onClick="window.open('/legal.html','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=360, height=230');return(false)">Mentions Légales</A><br /><A HREF="uvme.php">mlm</A>&nbsp;<A HREF="uvme.php">uvme</A>
</div></div><br />	</td>
</body>
</html>
  </tr>
</table>

</body>
</html>

c'est à dire une deuxième page insérée dans la première.

maintenant il reste juste la double fin de page :
		<div style="margin:5 0 0 23px; font-size:11px; font-family:verdana;">
		  <div align="center"><img src="images/bot_pic.gif" alt="loteries et jeux concours" align="bottom" style="margin:0 6 -2 0px">Voilou.fr &copy; Copyright 2007. All Rights Reserved - <A HREF="" onClick="window.open('/legal.html','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=360, height=230');return(false)">Mentions Légales</A><br />
</div></div><br />	</td>
</body>
</html>
  </tr>
</table>

</body>
</html>

pour les tableaux la règle c'est : il n'en faut pas.
0
KOKOLO
 
Bonjour,

Oui avant dans le footer c etait comme tu dis...mais j ai vu et corrigé..

Sinon pour les tableaux je voudrai bien faire sans mais j aurai pas de bonne mise en page...

Bon je vais tout refaire depuis le debut et on verra...

merci encore
0