Tom's Guide > Forum > Programmation > Galerie photo
Mot :    Pseudo :           
 

en fait je suis entrain de tester ce code ci dessus pour pouvoir faire apparaitre des photos dans ma galerie photo


<!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" xml:lang="fr" >
<head>
<title>Ma galerie d'images</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body {
width: 95%;
}

div {
width: 22%;
float: left;
text-align: center;
border: 1px solid black;
margin: 5px;
padding: 5px;
}

p {
text-align: left;
}

a {
color: #000000;
text-decoration: none;
}
</style>
</head>
<body>

<h1>Ma galerie d'images</h1>

<?php
$connexion = mysql_connect("localhost", "root", "" ) or exit (mysql_error());
$database = mysql_select_db("utlisateur" ) or exit (mysql_error());

$affichage = mysql_query("SELECT id_img, nom, description FROM images" ) or exit (mysql_error());
while($data = mysql_fetch_assoc($affichage)) {


echo '<div>';
echo '<a href="apercu.php?id_img='.$data[id_img].'"><img src="apercu.php?id_img='.$data[id_img].'" alt="'.$data[nom].'" title="'.$data[nom].'" /></a>';
echo '<p>Description : '.$data["description"].'</p>';
echo '</div>';
}
mysql_close();
?>

</body>
</html>




et il me fait ce erreur est ce que qlq un peu m aider





Notice: Use of undefined constant id_img - assumed 'id_img' in C:\wamp\www\test2\galerie.php on line 43

Notice: Use of undefined constant id_img - assumed 'id_img' in C:\wamp\www\test2\galerie.php on line 43

Notice: Use of undefined constant nom - assumed 'nom' in C:\wamp\www\test2\galerie.php on line 43

Notice: Use of undefined constant nom - assumed 'nom' in C:\wamp\www\test2\galerie.php on line 43

Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.

Je te conseillerais de regarder le tutoriel sur le site de grafikart

------------------------------ En Restaurant, le coeur de breizh
Répondre à Tybbow

j ai pense que le probleme vien de declaration 'id_img' 'nom et pourtant ils sont déclarer

Répondre à fat_75
Tom's Guide > Forum > Programmation > Galerie photo
Aller à :

Il y a 1988 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Liens