Voila en faite ça serait pour afficher les coup de coeur des site sur mon site mes je bug je n'arrive pas.
voila ma page
Si une personne pourrait m'aidez ça c'est mon site : http://www.bloc-annuaire.fr
Ma page de test pour ce code est ici http://www.bloc-annuaire.fr/test.php
Cordialement
Romain
+
voila ma page
Code:
<?php
function affichage_site_aleatoire($chiffre,$ext_css)
{
$requete=mysql_query("select id from sites_annuaires");
$nombre=mysql_num_rows($requete);
echo "<table align=center $ext_css>";
echo"<tr>";
echo "<td colspan=8 align=center><b> Les coups de coeur !!!</b></td>";
echo"</tr><tr>";
//boucle pour afficher 7 sites
for ($i=0;$i<$chiffre;$i++)
{
$nb=rand(1,$nombre);
$aff=mysql_query("select titre, description, url, url_image from sites_annuaires where id=$nb")or die (mysql_error());
$verif=mysql_num_rows($aff);
if($verif!=0)
{
$res=mysql_fetch_assoc($aff);
echo "<td valign=top title=\"$res[titre] - $res[description]\">";
echo "<a href=\"$res[url]\" onClick=\"open_classement('$res[url]')\">";
echo "<img src=\"$res[url_image]\" alt=\"$res[titre] - $res[description]\" border=0 width=120px height=90px>";
echo "</a>";
echo"</td>";
}
else
{
$i=$i-1;
}
}
echo "</tr>";
echo"</table>";
}
?>
<!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">
<head>
</head>
<body>
<p><?php
affichage_sites_aleatoire('5','class=ext_css');?></p>
</body>
Si une personne pourrait m'aidez ça c'est mon site : http://www.bloc-annuaire.fr
Ma page de test pour ce code est ici http://www.bloc-annuaire.fr/test.php
Cordialement
Romain
+