checkbox erreur
Posté : 17 févr. 2006, 14:56
Bonjour,
Je suis un debutant de php. J'arrive pas recuperer les valeurs de checkbox.
Version Php5
Appache2
J'ai joint le code. je dois activer qqchose dans .conf fichier?
Merci d'avance
//test_chk1.php
------------------------------------------
-------------------------------------------
//test_chk.php
Je suis un debutant de php. J'arrive pas recuperer les valeurs de checkbox.
Version Php5
Appache2
J'ai joint le code. je dois activer qqchose dans .conf fichier?
Merci d'avance
//test_chk1.php
------------------------------------------
Code : Tout sélectionner
<FORM ACTION="test_chk.php" METHOD=POST>
<P> Please tell us what you thought of this Web site. Select the checkboxes which you agree with: </P>
<UL>
<LI><inPUT TYPE=checkbox NAME="opinion[]" value="understandable">
The text was understandable.
<LI><inPUT TYPE=checkbox NAME="opinion[]" value="navigable">
I found it easy to find my way through the Web site.
<LI><inPUT TYPE=checkbox NAME="opinion[]" value="stylish">
I was impressed by the style and presentation.
</UL>
<P> <inPUT TYPE="HIDDEN" NAME="pages" value="brochure">
Please add any other comments:
<TEXTAREA NAME="feedback" ROWS=5 COLS=40>
I think your brochure is:
</TEXTAREA>
</P>
<P> <inPUT TYPE=SUBMIT value="Send comments">
<inPUT TYPE=RESET value="Clear form"> </P>
</FORM>
//test_chk.php
<?php
foreach ($opinion as $val)
{
$toto .= "'" . $val . "'" . "," ;
}
print substr($toto,0,(strlen($toto)-1)) ;
?>