source: http://www.asp-php.net/tutorial/asp-php/formulaires.php?page=5

<? if(!empty($_POST["mon_champ"])) { ?>
   Vous avez choisi comme option -
   <b>
   <?
   for ($i = 0; $i < count($_POST["mon_champ"]); $i++)
      echo $_POST["mon_champ"][$i]." - ";
   ?>
   </b><br><br>
<? } ?>
 
<FORM method="POST">
   <input type="checkbox" name="mon_champ[]"
      value=1>Option 1<br>
   <input type="checkbox" name="mon_champ[]"
      value=2>Option 2<br>
   <input type="checkbox" name="mon_champ[]"
      value=3>Option 3<br>
   <input type="Submit" value="OK">
</FORM>
  • info/checkbox_php.txt
  • Dernière modification: 2018/07/18 09:45
  • par radeff