liaison deux pages php en while
j'ai fait deux pages : test.php et tss.php
j'ai fait dans la page tss.php:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <?php
mysql_connect("localhost", "root", "");
mysql_select_db("tss");
$reponse = mysql_query("SELECT * FROM tss")or die(mysql_error());
while ($donnees = mysql_fetch_array($reponse) )
{
echo '<h2>Synopsis :</h2>';
echo $donnees['titre'];
}
?>
<?php
mysql_close();
?> |
et quand j'écris dans la page test.php par exemple:
Code:
<a href="tss.php?titre=Candide">Candide</a>
la page fait répéter tous les titres qui se trouve dans la BDD.:cry: