Affichage de l'image

Résolu
gbammelet Messages postés 45 Date d'inscription mardi 28 janvier 2014 Statut Membre Dernière intervention 15 décembre 2015 - 17 févr. 2014 à 13:04
jordane45 Messages postés 38139 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 20 avril 2024 - 17 févr. 2014 à 14:41
Bonjour,
je veux faire afficher dynamiquement les images dans une galerie, mon code me permet d'afficher le title de l'image en la survolant mais l'image ne s'affiche pas
voilà le code:

<?php
require('./connect/connect.php');
$requete="select 
ca.titre_making,
ca.stitre_making,
ca.photo_couv,
ca.date_making,
co.chemin,
co.title,
v.titre,
v.chemin
FROM making_off AS ca
JOIN image_off AS co ON ca.id_making=co.id_making
JOIN video_off AS v  ON ca.id_making=v.id_making
";
if($result=mysql_query($requete)){
while($making=mysql_fetch_assoc($result)){

echo'<li>';
	   echo'<a  href="img/$making["chemin"]" class="highslide" 
			onclick="return hs.expand(this, config1 )">
		<img src="img/$making["chemin"]" width="100" height="100"
			title="'.$making["title"].'" style="max-height:100px;max-width:100px;"/></a>';
		echo'</li>';
		    }
}
?>

2 réponses

jordane45 Messages postés 38139 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 20 avril 2024 344
Modifié par jordane45 le 17/02/2014 à 13:11
  echo'<a  href="img/$making["chemin"]" class="highslide" 
			onclick="return hs.expand(this, config1 )">
		<img src="img/'.$making['chemin'].'" width="100" height="100"
			title="'.$making["title"].'" style="max-height:100px;max-width:100px;"/></a>';
		



Avant de poser une question, merci de lire la charte du site.
Cordialement, Jordane
0
gbammelet Messages postés 45 Date d'inscription mardi 28 janvier 2014 Statut Membre Dernière intervention 15 décembre 2015
17 févr. 2014 à 14:32
ca ne marche toujours pas je vous transmet le code:
<?php
require('./connect/connect.php');
$requete="select 
ca.titre_making,
ca.stitre_making,
ca.photo_couv,
ca.date_making,
co.chemin,
co.title,
v.titre,
v.chemin
FROM making_off AS ca
JOIN image_off AS co ON ca.id_making=co.id_making
JOIN video_off AS v  ON ca.id_making=v.id_making
";
if($result=mysql_query($requete)){
while($making=mysql_fetch_assoc($result)){
echo'<li>';
	   echo'<a  href=\"img/'.$making[\"chemin\"].'\" class="highslide" 
			onclick="return hs.expand(this, config1 )">
		<img src="img/'.$making["\chemin\"].'" width="100" height="100"
			title="'.$making["title"].'" style="max-
height:100px;max-width:100px;"/></a>';
echo'</li>';
}
}
?>
0
jordane45 Messages postés 38139 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 20 avril 2024 344
17 févr. 2014 à 14:41
Et si tu examines l'élément directement sur ta page web ?

*Examiner élément : Action possible via le plugin Firebug pour FireFox...

Sinon, tu affices la source de ta page html et tu regardes au niveau de là où devrait se trouver l'image et tu regardes ce que ça t'affiche...

Par contre, testes avec la syntaxe comme suit :
echo'<li>';
  echo'<a  href="img'.$making['chemin'].'" class="highslide" 
		onclick="return hs.expand(this, config1 )">
		<img src="img/'.$making['chemin'].'" 
                       width="100" height="100"
			title="'.$making['title'].'" 
                        style="max-height:100px;max-width:100px;"
                         />
            </a>';
         // Pour tester si ta variable est bonne :
             print_r($making['chemin']);
echo'</li>'; 
0
Rejoignez-nous