je voudrais recuperer les données d'un adherent choisi à partir d'une liste deroulante issue de ma base de sonnées:
je vous adresse le code :
je pensais que la commande $retour[champ] me donnerais satisfaction mais le champ $retour[inscr_num] n'est pas défini.
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
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 <div class="div_conteneur_page" style= "width:50% ;height:820px"> <div id="GTitre" style="width:100%;"> <h1 style="font-size:24px">Informations du compte : Saison <?php echo $dateS ; ?></h1> </div> <br> <form method="post" action="gestion.php"> <table style="width: 90%; margin-left:40px;font-size:12px" > <td> <select id="num_adh" name="num_adh" style="width:90%; font-size:14px"> <!--onchange="document.getElementById('param').value ='recup_adh';recolter()">--> <option value="">Tout adhérent</option> <?php $liaison = mysqli_connect("localhost", "root","") or die ("Acces a la base de donnee impossible !!!"); mysqli_select_db($liaison, "judoclub") or die ("Accès à la base de donnée impossible !!!"); $requete = "SELECT * FROM inscr ORDER BY inscr_nomprenom ;"; $retours = mysqli_query($liaison, $requete) or die ("problème avec la requète ".$requete); while($retour = mysqli_fetch_array($retours)) { echo "<option value='".$retour["inscr_num"]."' > ".$retour["inscr_nomprenom"].",".$retour["inscr_num"]."</option>"; } ?> </select> </td> <?php if($retour["inscr_num"]!="") { $la_section = $retour["inscr_section"]; $le_nomprenom= $retour["inscr_nomprenom"]; $l_adresse = $retour["inscr_adresse"]; $le_codepostal = $retour["inscr_codepostal"]; } ?> </table> </form> <br><br> <table style="width: 80%; margin-left:40px;font-size:12px" > <tr> <td style="height: 4px; width: 40%;"><strong>Nom prénom</strong></td> <td style="height: 4px;width:50%"> <Input type="text" id="nomprenom" name="nomprenom" value="<?php echo htmlentities($le_nomprenom); ?>" style="width:110%; height:25px" > </td> </tr> <tr> <td style="height: 4px; width: 40%;"><strong>Section</strong></td> <td style="height: 4px;width:50%"> <input type="text" id="section" name="section" value="<?php echo htmlentities($la_section); ?>"style="width:110%; height:25px"> </td> </tr> <tr> <td style="height: 4px; width: 40%;"><strong>Adresse</strong></td> <td style="height: 4px;width:50%"> <input type="text" id="adresse" name="adresse" value="<?php echo htmlentities($l_adresse); ?>"style="width:110%; height:25px" > </td> </tr> <tr> <td style="height: 4px; width: 40%;"><strong>Code postal</strong></td> <td style="height: 4px"> <input type="text" name="codepostal" id="codepostal" value="<?php echo htmlentities($le_codepostal); ?>"style="width:110%; height:25px"> </td> </tr>
merci de votre aide
Partager