Log in

View Full Version : add dynamic selection list in db



user12
02-12-2014, 11:05 AM
Hi, i have a form with two select lists, one is populated with 4 options and one is empty. user clicking a button adds options in the empty list. The options are added with java script in the second list. Now, i need to insert this options into a database in separate columns (opt1, opt2, opt3, opt4).

<select name="Category" multiple="multiple">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<input onclick="addOption_list()" ;="" value="Add" type="button"><!--with this button i add option in empty list----->
<select id="Subcateg" name="Subcateg" multiple="multiple"></select><!--this is the empty list where the options are added----->

In the second list the options can be added in any order, the user can add one or all options and i need to insert in data base in this order.
can someone help me?

flatlander
02-26-2014, 03:42 PM
I think your almost at the point that you need to use sql.
Do you have a form with the correct action, method, enctype if any and the sql to go with it?
What else do you have?