Creation du formulaire et d'un menu d�roulant :
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 <? php creer_menu_deroulant(); ?> <FORM id="modif" name="modif1" action="modifier.php" method="get" encType="text/plain"> <tr> <td> Nom </td> <td> <input type="text" name="nom"> </td> </tr> <tr align="center"> <td colspan="2"> <input type="submit" value="Modifier"> </td> </tr> </form>
Menu deroulant :
Dans mon menu d�roulant, j'ai l'�v�nement "OnChange="gen()", mais je ne sais pas cod� cette fonction pour qu'elle remplisse les champs du formulaire (ci-dessus) en allant chercher les info dans une BD en utilisant l'idendifiant "id" de OPTION du menu d�roulant.
Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
9
10 <select size="1" name="D0" onchange="gen()"> <?php while ($tab = mysql_fetch_row($result) { ?> <option value="" id="<?php =$tab["Id_util"]?>"><?php =$tab["nom"]." ".$tab["prenom"] ?></option> <?php } ?> </select>
Comment fait on cela ?
Merci d'avance
Partager