Mon problème, toutes mes annonces s'affichent bien dans les derniers dons et dernieres demandes sauf une, la seule qui à une image dans les dernieres demandes, je ne comprends pas pourquoi ...
Pouvez vous m'aider svp? merci beaucoup !
html/php
<h3>Derniers dons :</h3>
<?
mysql_connect('mysql5-6','jojo','jojo');
mysql_select_db('jojo');
$d=mysql_query("SELECT * FROM don WHERE intitule='donne' AND accept='oui' ORDER BY id DESC LIMIT 0,6");
$max=100;
while ($a=mysql_fetch_array($d))
{
$desc=$a['desc'];
$image=$a['photo_1'];
?>
<div class="right_articles">
<p><a href="dons.php?annonce=<? echo $a['titre']; ?>&id=<? echo $a['id']; ?>"><?php if ($image!=""){ echo '<img src="upload/'.$image.'" alt="'.$a['titre'].'" title="'.$a['titre'].'" class="image" width="60px" height="60px" id="hover" />'; } else {?><img src="images/image.png" alt="<? echo $a['titre']; ?>" title="<? echo $a['titre']; ?>" class="image" id="hover" /><?php } ?></a>
<b><a href="dons.php?annonce=<? echo $a['titre']; ?>&id=<? echo $a['id']; ?>" title="<? echo $a['titre']; ?>"><? echo $a['titre']; ?></a></b>
<?
if (strlen($desc) >= $max) {
$desc = substr($desc, 0, $max);
$espace = strrpos($desc, " ");
$desc = substr($desc, 0, $espace)."...";
}
?>
<br /><? echo $desc; ?></p>
</div>
<?
}
?>
<!-- Dernières demandes -->
<h3>Dernières demandes :</h3>
<?
$de=mysql_query("SELECT * FROM don WHERE intitule='demande' AND accept='oui' ORDER BY id DESC LIMIT 0,6");
$max=100;
while ($dem=mysql_fetch_array($de))
{
$desc_dem=$dem['desc'];
$img_dem=$dem['photo_1'];
?>
<div class="right_articles">
<p><a href="demandes.php?annonce=<? echo $dem['titre']; ?>&id=<? echo $dem['id']; ?>"><? if ($img_dem!=""){ echo '<img src="upload/'.$img_dem.'" width="60" height="60" id="hover" />'; }else {?> <img src="images/image.png" class="image" id="hover" /><? } ?></a>
<b><a href="demandes.php?annonce=<? echo $dem['titre']; ?>&id=<? echo $dem['id']; ?>" title="<? echo $dem['titre']; ?>"><? echo $dem['titre']; ?></a></b>
<?
if (strlen($desc) >= $max) {
$desc_dem = substr($desc_dem, 0, $max);
$espace = strrpos($desc_dem, " ");
$desc_dem = substr($desc_dem, 0, $espace)."...";
}
?>
<br /><? echo $desc_dem; ?></p>
</div>
<?
}
?>
css :
Code : Tout sélectionner
<style type="text/css">
#menu_demandes
{width:150px;text-align:center;background-color:#EDEDED;}
.navigation
{width:450px;position:relative;top:-460px;left:170px;text-align:center;}
.titre_menu_demandes
{background-image:url(images/menubg.gif);padding:3px;color:#797979;}
#centre
{width:70%;position:relative;top:-440px;left:180px;}
#centre table
{width:100%;}
#centre td
{text-align:center;}
</style>