Afficher un tableau d'images
bonjour, je suis en train de faire une galerie d'image administrable et je souhaiterai afficher un tableau d'images via un script php.
Voici mon code qui ne marche pa!!
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
<?php require_once('Connections/Q2base.php'); ?>
<?php
mysql_select_db($database_Q2base, $Q2base);
$query_images = "SELECT filename, id_campagne FROM images WHERE id_campagne=1";
$images = mysql_query($query_images, $Q2base) or die(mysql_error());
$row_images = mysql_fetch_assoc($images);
$totalRows_images = mysql_num_rows($images);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="js/jquery-1.3.1.js"></script>
<script type="text/javascript" src="js/jquery-ui-personalized-1.6rc2.packed.js"></script>
<script type="text/javascript" src="js/jquery.flip.js"></script>
<script type="text/javascript" src="js/codeFlip.js"></script>
</head>
<body>
<!-- //// CONTENT //// -->
<table>
<tr>
<td colspan="4">
<span class="titre">Elyo Suez</span>
</td>
</tr>
<tr>
<?php
//images campagne1
while($row_images = mysql_fetch_assoc($images)){
echo "<td><a href='#'><img src='images/".$row_images['filename']." class='chemin' /></a></td>\n";
}
?>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($images);
mysql_free_result($image);
?> |
quand je lance ma page mes images ne s'affichent pas et des erreurs aparaissent sur la page :
[strong]
Notice: Undefined variable: image in c:\documents and settings\clemence\bureau\site\back.php on line 156
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in c:\documents and settings\clemence\bureau\site\back.php on line 156
[/strong]
Si quelqu'un pouvait m'aider svp!!