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
| <?php
mysql_connect("localhost", "root", "");
mysql_select_db("test");
if (isset($_POST['annee']))
{
$annee = addslashes($_POST['annee']);
}
?>
<table><tr>
<th>Choix</th>
<th>Année</th>
</tr>
<?php
$retour = mysql_query('SELECT annee FROM sport');
while ($donnees = mysql_fetch_array($retour)) // j'ai fait une boucle pour lister les années
{
?>
<tr>
<td><?php echo '<a href="liste_saisie.php?choix_annee=' . $donnees['annee'] . '">'; ?>Choisir</td>
<td><?php echo stripslashes($donnees['annee']); ?></td>
</tr>
<?php
} // Fin de la boucle qui liste les années
?>
</table>
</body>
</html> |
Partager