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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function Choix1(){
i = choisir.discipline1.selectedIndex;
if (i == 0){
return;
}
elu = choisir.discipline1.option[i+1].value;
<?php
$reponse = mysql_query ("SELECT * FROM service WHERE discipline = '".$elu."'") or die (mysql_error());
echo"<select name = 'ser1'>";
while ($don = mysql_fetch_array($reponse)){
echo"<option value = '".$don['nomservice'].">".$don['nomservice']."</option>";
}
echo"</select>";
?>
}
</script>
<title>Document sans titre</title>
</head>
<body>
<?php
include ("connecter.php");
?>
<form name = "choisir" method="post" action="">
discipline1 : <select name = "discipline1" onchange = "Choix1()" >
<option value = "" selected >.......Choisir........</option>
<option value = "Medecine" > Medecine </option>
<option value = "Pédiatrie"> Pédiatrie </option>
<option value = "Gynécologie"> Gynécologie </option>
<option value = "Chirurgie"> Chirurgie </option>
</select>
<br/>
Service1 :
<select name = 'ser1'>
<option> </option>
<option> </option>
<option> </option>
</select>
<br/>
</form>
</body>
</html> |