Je voudrais récuperer une variable à partir d'un formulaire.
L'operation marche parfaitement avec un champ de texte:
Code : Tout sélectionner
<input name="entreprise" type="text" id="entreprise">mais quand j'essaye de le faire à partir d'une liste:
<select name="entreprise" id="entreprise">
<?php
do {
?>
<option value="<?php echo $row_ID_entreprises['action_id']?>"<?php if (!(strcmp($row_ID_entreprises['action_id'], $row_ID_entreprises['action_societe']))) {echo "SELECTED";} ?>><?php echo $row_ID_entreprises['action_id']?></option>
<?php
} while ($row_ID_entreprises = mysql_fetch_assoc($ID_entreprises));
$rows = mysql_num_rows($ID_entreprises);
if($rows > 0) {
mysql_data_seek($ID_entreprises, 0);
$row_ID_entreprises = mysql_fetch_assoc($ID_entreprises);
}
?>
impossible de recuperer la variable....Le formulaire est en "POST" et sur la page cible, j'utilise:if(isset($_POST['entreprise'])) $entreprise=$_POST['entreprise'];
else $entreprise="";
Donc je voudrais savoir pourquoi ça ne marche pas...
Merci d'avance.
J'espere avoir été assez clair, sinon demandez des info