pb bouton radio

pb bouton radio - PHP - Programmation

Marsh Posté le 27-05-2005 à 21:11:14    

<form method="POST">
<input type="radio" name="mon_champ" value="Option 1">Option 1<br>
<input type="radio" name="mon_champ" value="Option 2">Option 2<br>
<input type="radio" name="mon_champ" value="Option 3">Option 3<br>
<input type="submit" value="OK">
 
</form>
 
 <? if($mon_champ) { ?>
    Vous avez choisi :
    <b><? echo $mon_champ; ?></b>
    <br><br>
<? } ?>
 
j'ai du mal a faire marcher ce code il me dit que $_mon_champ n'est pas def
 
C'est la première fois que j'utilise ca si vous pouviez me rencarder svp
 
thanks  :jap:

Reply

Marsh Posté le 27-05-2005 à 21:11:14   

Reply

Marsh Posté le 27-05-2005 à 21:34:11    

Essaye avec $_POST['mon_champ']

Reply

Marsh Posté le 27-05-2005 à 21:52:55    

yup, c'est $_POST['mon_champ'] qu'il faut utiliser.
et $_GET si tu utilises method="get" dans le form


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Marsh Posté le 27-05-2005 à 22:32:24    

matel a écrit :


 <? if($mon_champ) { ?>
    Vous avez choisi :
    <b><? echo $mon_champ; ?></b>
    <br><br>
<? } ?>


Qu'est-ce que c'est beau :love:  

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed