Bonjour,
Je passe les variables suivantes issues de la BD:
pour recuperer ma variable dont je ne connais pas le nom, j'ai:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 echo " <SELECT NAME='".$respackoption['nomoption']."'>";//issue d'une requette $reqproduitpack=mysql_query("SELECT * FROM article WHERE numarticle IN ....."); while ($resproduitpack = mysql_fetch_array($reqproduitpack)) { echo "<OPTION VALUE='".$resproduitpack['numarticle']."'>".$resproduitpack['nomarticle'.$lg.'']." (+".$resproduitpack['prixttc']." TTC)</OPTION>"; } echo "</select><br /><br />";
MAIS $_POST[$respackoption['nomoption']] NE VAUT rien ..
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 $nompack = stripcslashes($respack['nompack']);//issue d'une requette $reqpackoption=mysql_query("SELECT * FROM pack WHERE nompack..."); while ($respackoption = mysql_fetch_array($reqpackoption)) { $reqproduitpack=mysql_query("SELECT * FROM article WHERE numarticle..."); while ($resproduitpack = mysql_fetch_array($reqproduitpack)) { $nomoptionpack = $respackoption['nomoption']; if ($_POST[$respackoption['nomoption']] == $resproduitpack['numarticle']) echo $_POST[$respackoption['nomoption']];
comment l'écrire ?
Merci pour vos suggestions
Alban
Partager