Me revoilà!
Si tu es toujours là Moogli je serai le plus heureux ^^
Voilà j'ai un petit peu avancé depuis la dernière fois et je voulais t'exposer ce que j'ai réalisé depuis. J'ai petit problème et juste une question à te poser.
Voici ma base de donnée complète:
-- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Dim 18 Décembre 2011 à 12:56
-- Version du serveur: 5.5.9
-- Version de PHP: 5.3.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Base de données: `session3d`
--
-- --------------------------------------------------------
--
-- Structure de la table `photo`
--
CREATE TABLE `photo` (
`idphoto` int(10) unsigned NOT NULL AUTO_INCREMENT,
`idphotopaysage` int(10) unsigned NOT NULL,
`idphotostreet` int(10) unsigned NOT NULL,
`datedesortie` varchar(50) NOT NULL,
`lien` varchar(50) NOT NULL,
PRIMARY KEY (`idphoto`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Contenu de la table `photo`
--
-- --------------------------------------------------------
--
-- Structure de la table `photopaysage`
--
CREATE TABLE `photopaysage` (
`idphotopaysage` int(10) unsigned NOT NULL AUTO_INCREMENT,
`titre` varchar(25) NOT NULL,
`visu` varchar(100) NOT NULL,
`datedesortie` varchar(50) NOT NULL,
`genre` varchar(30) NOT NULL,
PRIMARY KEY (`idphotopaysage`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
--
-- Contenu de la table `photopaysage`
--
INSERT INTO `photopaysage` VALUES(1, 'Nice', '../images/visu/nice.jpg', 'Decembre 2009', 'Nuit du 5 décembre');
INSERT INTO `photopaysage` VALUES(2, 'Cannes, '../images/visu/cannes.jpg', 'Mai 2011', 'Journée du Festival');
INSERT INTO `photopaysage` VALUES(3, 'St Jean Cap Ferrat', '../images/visu/capferrat.jpg', 'Aout 2011', 'Soleil sur la Cap');
-- --------------------------------------------------------
--
-- Structure de la table `photostreet`
--
CREATE TABLE `photostreet` (
`idphotostreet` int(10) unsigned NOT NULL AUTO_INCREMENT,
`datedesortie` varchar(50) NOT NULL,
PRIMARY KEY (`idphotostreet`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Contenu de la table `photostreet`
--
-- --------------------------------------------------------
--
-- Structure de la table `commentairesphoto`
--
CREATE TABLE `commentairesphoto` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_photopaysage` int(11) NOT NULL,
`auteur` varchar(255) NOT NULL,
`commentaire` text NOT NULL,
`date_commentaire` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Contenu de la table `commentairesphoto`
--
-- --------------------------------------------------------
--
-- Structure de la table `ratings`
--
CREATE TABLE `ratings` (
`id` varchar(255) NOT NULL,
`total_votes` int(11) NOT NULL DEFAULT '0',
`total_value` int(11) NOT NULL DEFAULT '0',
`used_ips` longtext,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Contenu de la table `ratings`
--
INSERT INTO `ratings` VALUES('8', 0, 0, '');
Là mon fichier pour mes photos de paysages paysages.php :
<?php require('../_drawrating.php'); ?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr_FR" lang="fr_FR">
<head>
<title>...</title>
<script type="text/javascript" src="../style/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../slider/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript" src="../js/behavior.js"></script>
<script type="text/javascript" src="../js/rating.js"></script>
<link rel="stylesheet" href="../slider/nivo.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../slider/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../slider/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../base.css" type="text/css" />
<!-- Required CSS -->
</head>
<script type="text/javascript">
$(document).ready(function(){
$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
$("ul.topnav li span").click(function() { //When trigger is clicked...
//Following events are applied to the subnav itself (moving subnav up and down)
$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
$(this).parent().hover(function() {
}, function(){
$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
});
//Following events are applied to the trigger (Hover events for the trigger)
}).hover(function() {
$(this).addClass("subhover"); //On hover over, add class "subhover"
}, function(){ //On Hover Out
$(this).removeClass("subhover"); //On hover out, remove class "subhover"
});
});
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<body>
<div id="container">
<div id="logo">
<ul class="topnav">
//ici mon menu déroulant
</div>
<div class="e1">
<?php
// Connexion à la base de données
try
{
$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
$bdd = new PDO('mysql:host=localhost;dbname=session3d', 'root', 'root', $pdo_options);
// je recupere toutes mes photos
$req = $bdd->query('SELECT idphotopaysage, visu, titre, datedesortie, genre FROM photopaysage');
while ($donnees = $req->fetch())
{
?>
<?php echo htmlspecialchars($donnees['titre']); ?><br />
<div class="cinevisu"><img src="<?php echo htmlspecialchars($donnees['visu']); ?>" alt="" width="150" height="200"/>
</div>
<div class="e2">
Date de sortie<br />
Genre<br />
Nombre de commentaires<br />
Commentez<br />
VOTEZ
</div>
<div class="e3">
<?php echo htmlspecialchars($donnees['datedesortie']); ?><br />
<?php echo htmlspecialchars($donnees['genre']); ?><br /><br />
<a href="photocom.php?photopaysage=<?php echo $donnees['idphotopaysage']; ?>">Commentez maintenant</a>
</div>
<div class="ratecinefilms">
<?php echo rating_bar('','5'); ?>
</div>
// tout se passe très bien, mes photos ainsi que tous les éléments s'affichent l'un après l'autre
<?php
}
$req->closeCursor();
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
?>
</div>
</html>
Et maintenant la pages des commentaires pour mes photos photocom.php (
je ne vois aucune erreur mais pourtant cette page devrait mais ne fonctionne pas!!! 
):
<?php require('../_drawrating.php'); ?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr_FR" lang="fr_FR">
<head>
<title>...</title>
<script type="text/javascript" src="../style/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../slider/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript" src="../js/behavior.js"></script>
<script type="text/javascript" src="../js/rating.js"></script>
<link rel="stylesheet" href="../slider/nivo.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../slider/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../slider/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../base.css" type="text/css" />
<!-- Required CSS -->
</head>
<script type="text/javascript">
$(document).ready(function(){
$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
$("ul.topnav li span").click(function() { //When trigger is clicked...
//Following events are applied to the subnav itself (moving subnav up and down)
$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click
$(this).parent().hover(function() {
}, function(){
$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
});
//Following events are applied to the trigger (Hover events for the trigger)
}).hover(function() {
$(this).addClass("subhover"); //On hover over, add class "subhover"
}, function(){ //On Hover Out
$(this).removeClass("subhover"); //On hover out, remove class "subhover"
});
});
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<body>
<div id="container">
<div id="logo">
<ul class="topnav">
//mon menu déroulant
</div>
<div class="e1">
<?php
// Connexion à la base de données
try
{
$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
$bdd = new PDO('mysql:host=localhost;dbname=session3d', 'root', 'root', $pdo_options);
// Récupération du billet
$req = $bdd->prepare('SELECT idphotopaysage, visu, titre, datedesortie, genre FROM photopaysage WHERE idphotopaysage = ?'');
$req->execute(array($_GET['photopaysage']));
$donnees = $req->fetch();
?>
<?php echo htmlspecialchars($donnees['titre']); ?><br />
<div class="cinevisu"><img src="<?php echo htmlspecialchars($donnees['visu']); ?>" alt="" width="150" height="200"/>
</div>
<div class="e2">
Date de sortie<br />
Genre<br />
Nombre de commentaires<br />
Commentez<br />
VOTEZ
</div>
<div class="e3">
<?php echo htmlspecialchars($donnees['datedesortie']); ?><br />
<?php echo htmlspecialchars($donnees['genre']); ?><br /><br />
</div>
<div class="ratecinefilms">
<?php echo rating_bar('','5'); ?>
</div>
<?php
}
$req->closeCursor();
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
?>
</div>
</html>
Voilà, donc je préfère t'informer que je n'ai pas mis la partie des commentaires car rien que le début ne fonctionne déjà pas, je me retrouve devant une magnifique page blanche!! Ce qui est très étonnant c'est que j'ai recopié un exercice de blog que j'avais fait depuis un tuto avec la même structure qui lui fonctionne

... Je pense une fois que j'aurai résolu ce problème, tout sera ok pour moi!!
Et deuxième question: comment attribuer la note à une photo spécifique? comme cela? :
<div class="ratecinefilms">
<?php echo rating_bar('$donnees['idcindefilms']','5'); ?>
</div>
Merci à toi!!!!!