Bonjour

J'ai un script très simple qui ne fonctionne pas j'y perd mon latin... si qq peut se pencher dessus, ça serait sympa, je joint le script et le dump.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
<?php
 
$connexion=mysql_connect("localhost","root","");
mysql_select_db("gites");
 
// requete
$requete = "SELECT * FROM photos;";
 
// on envoie la requête
$resultat = mysql_query($requete) or die('Erreur SQL !<br>'.$requete.'<br>'.mysql_error());
 
echo "<table border '1'>";
echo "<td width=200><h><strong>Page</strong></h></td>";
echo "<td width =200><h> <strong>photo1 </strong></h></td>";
echo "<td width =200><h> <strong>photo2 </strong></h></td></tr>";
 
if ($tableau = mysql_fetch_array($resultat))
{
do
{
$page=$tableau["page"];
$photo1=$tableau["photo1"];
$photo2=$tableau["photo2"];
 
echo "<tr>
	<td>$page</td>
	<td>$photo1</td>
	<td>$photo2</td>
	</tr>";
 
}
while ($tableau=mysql_fetch_array($resultat));
}	
else 
{
echo "Aucun élément à afficher pour $requete";	
}
 
echo "</table>";
 
 
mysql_close();
?>

ici le dump
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
-- phpMyAdmin SQL Dump
-- version 3.2.1
-- <a href="http://www.phpmyadmin.net" target="_blank">http://www.phpmyadmin.net</a>
--
-- Serveur: localhost
-- Généré le : Mer 19 Janvier 2011 à 17:39
-- Version du serveur: 5.1.37
-- Version de PHP: 5.3.0
 
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
 
--
-- Base de données: `gites`
--
 
-- --------------------------------------------------------
 
--
-- Structure de la table `photos`
--
 
CREATE TABLE IF NOT EXISTS `photos` (
  `page` text NOT NULL,
  `photo1` text NOT NULL,
  `photo2` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
--
-- Contenu de la table `photos`
--
 
INSERT INTO `photos` (`page`, `photo1`, `photo2`) VALUES
('accueil', 'maison', 'pompe'),
('liens', 'toto', 'titi');
merci du coup de main