I want to submit a form with two components: two dropdown lists. Only the first form 'School' and the submit button itself are submitted. The second form 'pool' is gone somehow.
<form method='get'> <select name='School'> <option>School Name</option> <?php while ($row = sqlsrv_fetch_object($result)){?> <option value= "<?php echo $row->ClientID ?>" > <?php echo $row->ClientName; ?></option> <?php } ?> </select> <div id='result'> <select name='pool1[]' id="pool" multiple="multiple"> <option value='de'>de</option> </select> <input type="button" value="Delete" name="submit2" onclick="removeOption();"/> </div> <div id="teacherdiv"> <select name="Teacher[]"> <option>Select Teacher First</option> </select> </div> <input type="submit" value="Add" name="submit"/> </form> This is the URL that I got after I pressed the submit button:
SchoolName.php?School=7&Teacher%5B%5D=Select+Teacher+First&submit=Add
The pool1 dropdown list is not in there.
pool, it's namedpool1http://127.0.0.1/test.php?pool1[]=de&Teacher[]=Select+Teacher+First&submit=Addyou need to selectdebefore submit or make it selected by default