Publish multiple selection values

How can I post multiple-choice values โ€‹โ€‹in a form? When I hit, none of the selected values โ€‹โ€‹were sent.

<form id="form" action="" method="post"> <div> <select id="inscompSelected" multiple="multiple" class="lstSelected"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <input type="submit" value="submit"> </div> </form> 
+46
html html-select
Jul 23 '12 at 16:32
source share
1 answer

You need to add the name attribute, and since it requires multiple selection, you will need the array symbol [] at the end.

 <select name="something[]" id="inscompSelected" multiple="multiple" class="lstSelected"> 
+87
Jul 23 2018-12-12T00:
source share
โ€” -



All Articles