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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nouvelle page 8</title>
</head>
<body>
<?PHP
$aTab = array (
'Sélectionnez l\'année' => array (''),
'Année 2007' => array ('2007'),
'Année 2008' => array ('2008'),
'Année 2009' => array ('2009'),
);
?>
<form method="post" id="mainForm">
<p align="center">
<select name="liste1" onchange="document.getElementById('mainForm').submit();">
<?php
foreach ($aTab as $clef => $dump)
{
$selected=(isset($_POST['liste1'])& $_POST['liste1'] == $clef);
echo '<option value="'.$dump[0].'">',$clef,'</option>';
}
?>
</select>
</p>
</form>
<BR><BR>
<?PHP
$aTab2 = array (
'Sélectionnez le mois' => array (''),
'Janvier' => array ('Janvier'),
'Février' => array ('Février'),
'Mars' => array ('Mars'),
);
?>
<form method="post" id="dem_ann">
<p align="center">
<select name="liste2" onchange="document.getElementById('dem_ann').submit();">
<?php
foreach ($aTab2 as $clef2 => $dump2)
{
$selected=(isset($_POST['liste2'])& $_POST['liste2'] == $clef2);
echo '<option value="'.$dump2[0].'">',$clef2,'</option>';
}
?>
</select>
</p>
</form>
<BR><BR>
<?PHP
echo "Votre sélection année : ".$_POST['liste1'];
echo "<BR>";
echo "Votre sélection mois *: ".$_POST['liste2'];
?>
</body>
</html> |
Partager