I have a for which the user can add multiple fields dynamically, which allows them to expand for more entries.
most of the data is singgle values except one field which is a multiple select field.
so if the user wants 5 multiple select fields my html looks like
However the problem is then when the form is submitted, all the data is stored into one array instead of a 2 dimesnional array with data from each select in its own array.
It's impossible to keep track of which data comes from which select box.
Any suggestions?
Thanks
Chris
most of the data is singgle values except one field which is a multiple select field.
so if the user wants 5 multiple select fields my html looks like
Code:
<select name="requirements[]" multiple size=10>
..
<select name="requirements[]" multiple size=10>
..
<select name="requirements[]" multiple size=10>
..
<select name="requirements[]" multiple size=10>
..
<select name="requirements[]" multiple size=10>
However the problem is then when the form is submitted, all the data is stored into one array instead of a 2 dimesnional array with data from each select in its own array.
Code:
$requirements[] = $_POST['requirements[]'];
It's impossible to keep track of which data comes from which select box.
Any suggestions?
Thanks
Chris