J'ai un menu déroulant dont je souhaite dans un premier temps, afficher des variables et dans un second temps envoyer la valeur sélectionnée vers ma base de donnée...malgrés avoir consulté plusieurs tuto et forum je suis un peut perdu...
Voici mon menu déroulant :
Code : Tout sélectionner
<select name="choix">
<option value="choix1">Choix 1</option>
<option value="choix2">Choix 2</option>
<option value="choix3">Choix 3</option>
<option value="choix4">Choix 4</option>
</select>Code : Tout sélectionner
.....
</div><!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Genre</th>
<th>Nom</th>
<th>Prénom</th>
<th>Age</th>
<th>Ville</th>
</tr>
</thead> <tbody>
<?php
$sql = "SELECT id,id_etat,genre,nom,prenom,age,tel1,ville,mod_souhaite1,id_grp,groupe,id_groupe
FROM `ny6dh_man_eleve` A, `ny6dh_man_groupe` B
WHERE A.id_etat = 0
AND A.mod_souhaite1 = 1
AND B.id_grp = A.id_groupe";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo " <tr><td>". $row["genre"]."</td>
<td>". $row["nom"]."</td>
<td>". $row["prenom"]."</td>
<td>". $row["age"]."</td>
<td>". $row["ville"]."</td></tr> ";
}
} else {
echo "0 results";
}
$conn->close();
?>
</tbody>
<tfoot>
<tr>
<th>Genre</th>
<th>Nom</th>
<th>Prénom</th>
<th>Age</th>
<th>Ville</th>
</tr>
</tfoot>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->