Page 1 sur 1

erreur de code !!!

Posté : 03 juin 2008, 12:18
par mathias
bonjour je suis en train de refaire le design d'un site php malheureusement je ne suis formé qu'à html donc j'ai eu un petit souci en voulant rajouté un simple bouton sur le site mon script n'affiche plus aucune image de la page de fond de la page ... sa fait un peu tache pour le premier jour de stage ... si vous voyez une erreur merci de me la faire remarquer merci d'avance....

le sript:
<?PHP
if ($_GET["produit"]=="")
{
	
$sql="select id_serie from serie as s,categorie as c where c.id_categorie = s.id_categorie  and status=1 order by id_serie desc limit 1";
$result = mysql_query($sql);
$Obj = mysql_fetch_object($result);
$id_serie = $Obj->id_serie;	
	
	
}
else 
	$id_serie = $_GET["produit"];

$sql="select titre_vf,year_prod,synopsis,categorie,nb_episode from serie as s,categorie as c where c.id_categorie = s.id_categorie and id_serie=$id_serie and status=1";
$result = mysql_query($sql);
$Obj = mysql_fetch_object($result);
if (mysql_num_rows($result) == 0)
	exit();
	
$sql="select genre from genre_serie as gs,genre as g where g.id_genre = gs.id_genre and id_serie=$id_serie";	

$result = mysql_query($sql);
$i=0;
while($Obj3 = mysql_fetch_object($result))
{
	if ($i==0)
		$txt_genre=$Obj3->genre;
	else 
		$txt_genre.= ', '.$Obj3->genre;
	$i++;

}
?>


<table cellpadding="0" cellspacing="0">
<tr>
	<td background="file:images/produit/menu_gauche.gif" height="663" width="312" valign="top" >
	<ul id="catList">
	<li>&nbsp;</li>
	<?php 
		$sql="select id_serie,titre_vf from serie where status=1 order by titre_vf";
		$result = mysql_query($sql);
		while($Obj2 = mysql_fetch_object($result))
			print '<li><a href="index.php?pages=fiche_produit&produit='.$Obj2->id_serie.'">'.$Obj2->titre_vf.'</a></li>';
	?>
			    	
	</ul>
	
	</td>
	<td valign="top" width="34" ><center><img src="file:images/produit/produit.gif" height="662" width="30" /></center></td>
	<td background="file:images/produit/menu_droite.gif" width="521" height="664"  valign="top">
	<img src="images/produit/ban/<?php print $id_serie; ?>.gif" style="margin-top:45px;margin-left:10px" />
	<table cellpadding="0" cellspacing="0" style="margin:10px;" border="0" >
	<tr>
		<td background="file:images/produit/font_text.gif" width="459"  height="443" rowspan="2" valign="top">
		<table width="424" cellpadding="0" border="0" cellspacing="0" style="margin:20px">
		<tr>
			<td width="170"><img src="images/produit/icone/<?php  print $id_serie; ?>.gif" width="170" /></td>
			<td align="left" width="254">
				
				<table  height="140" style="color: #FFFFFF; font-size: 14px; font-family: Arial;text-align:justify;margin-left:5px">
				<tr><td><b>TITRE :</b><?php print $Obj->titre_vf ?></td></tr>
				<tr><td><b>GENRE :</b> <?php print $txt_genre; ?></td></tr>
				<tr><td><b>TYPE :</b> <?php print $Obj->categorie ?></td></tr>
				<tr><td><b>ANNEE DE PRODUCTION :</b> <?php print $Obj->year_prod ?></td></tr>
				<tr><td><b>NOMBRE D'EPISODES :</b> <?php print $Obj->nb_episode ?></td></tr>
				</table>
	
			
			</td>
		</tr>	
		<tr>
			<td colspan="2">
			<div id="texte_fiche">
			
			<?php 
			
			if (strlen($Obj->synopsis) > 800 )
			{
				print '<div style="width:400px" >' ;
			}

			?>
						
			<?php print str_replace("\n","<br />",$Obj->synopsis); ?></div>
			
				<?php 
			
			if (strlen($Obj->synopsis) > 800 )
			{
				print '</div>' ;
			}

			?>
			
			
			</td>
		</tr>	
		
		</table>
		
		
		
		
		</td>
		<td valign="top" height="105"><img src="file:images/produit/synopsis.gif" style="margin-left:0px;margin-top:5px" /></td>
	</tr>
	<tr>
		<td valign="top" height="338"><!-- <img src="images/produit/onglet_produit.gif" style="margin-left:0px;margin-top:5px" />--></td>
	</tr>
	</table>
	
	
	</td>
</tr>
</table>
[/php]

Posté : 03 juin 2008, 15:53
par katagoto
Tu t'es gourré de forum,
Teste $_GET par !empty et isset, je ne vois pas trop si non, pourrait-on voir ton code avant ta modif ???