affichage d'infos depuis sql
Posté : 01 nov. 2005, 17:18
bonjour
pour lister les bannières de mes visteurs, j'ai créé ce code, qui affiche des infos dans un tableau
le code est très long
je vois pas ce qui ne vas pas
pour lister les bannières de mes visteurs, j'ai créé ce code, qui affiche des infos dans un tableau
le code est très long
sauf que sa n'affiche rien du tout, pourtant j'ai des bannières mais ???<?php
$db = mysql_connect('sql.free.fr', 'xxx', 'xxx'); // 1
mysql_select_db('yuu_sw',$db); // 2
$req = mysql_query("SELECT ban_id, ban_lien, ban_emp, ban_fond, ban_color, ban_color2, ban_txt, ban_credits, ban_affiche, ban_affichage FROM a_ban WHERE user_id='$id3'"); // 3
while($data = mysql_fetch_assoc($req))
{
'<p><table width="494" height="280" border="0" cellpadding="0" cellspacing="0">';
'<tr>';
'<td colspan="2" rowspan="3"><img src="'.$data['ban_emp'].'" width="468" height="60"></td>';
'<td width="26" height="20"><div align="center"><a href="/echange/mebres/ban_infos_modif.php?ban_id='.$data['ban_id'].'" class="menulink"><strong>M</strong></a></div></td>';
'</tr>';
'<tr>';
'<td width="26" height="20"><div align="center"><a href="/echange/membres/ban_infos_delete.php?ban_id='.$data['ban_id'].'" class="menulink"><strong>S</strong></a></div></td>';
'</tr>';
'<tr>';
'<td width="26" height="20"> </td>';
'</tr>';
'<tr>';
'<td width="71" height="20">ID</td>';
'<td width="397" height="20">'.$data['ban_id'].'</td>';
'<td width="26" height="20"> </td>';
'</tr>';
'<tr>';
'<td width="71" height="20">Lien</td>';
'<td width="397" height="20">'.$data['ban_lien'].'</td>';
'<td width="26" height="20"> </td>';
'</tr>';
'<tr>';
'<td width="71" height="20">Emplacement</td>';
'<td width="397" height="20">'.$data['ban_emp'].'</td>';
'<td width="26" height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Fond</td>';
'<td height="20">'.$data['ban_fond'].'</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Color1</td>';
'<td height="20">'.$data['ban_color'].'</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Color2</td>';
'<td height="20">'.$data['ban_color2'].'</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Texte</td>';
'<td height="20">'.$data['ban_txt'].'</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Crédits</td>';
'<td height="20">'.$data['ban_credits'].'</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">affichée</td>';
'<td height="20">votre bannière a étée affichée '.$data['ban_affiche'].' fois</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Affichages</td>';
'<td height="20">vous avez effectué '.$data['ban_affichage'].' avec ce compte bannière</td>';
'<td height="20"> </td>';
'</tr>';
'<tr>';
'<td height="20">Code</td>';
'<td height="20"><p><iframe src="http://www.banniere-echange.fr.tc/frame ... id='.$data['ban_id'].'" name="frame_ban_1" width="500" height="100" scrolling="no" frameborder="0" hspace="0" vspace="0" id="frame_ban_1" border="0" ></iframe></p>';
'<p> </p></td>';
'<td height="20"> </td>';
'</tr>';
'</table></p>';
}
mysql_close($db); // 6
?>
je vois pas ce qui ne vas pas