I'll try to make this as clear as possible For this example, my form is collecting data on a user's favorite fruits. I have a form that uses two tables from my database. The first table (table1) populates the form's labels and field names. The 2nd table (table2) collects the data entered into the form. How it works so far: Table2 contains all data entered by the form. I'll name the columns (item1, item2, item3) for example. So on the form, you see a field for each of them, named item1, item2, and item3. If a user enters apple into item1, orange into item2, and banana into item3 -- then our table2 will have a row with apple, orange, and banana under their appropriate columns. Table1 contains two columns; the first column contains a list of all the column names from table2. I'll explain this in a bit. The 2nd column contains label names for the entries in column1 (fruit #1, fruit #2, fruit #3). Now, the reason why table1 exists is to dynamically populate the form. I wanted a form that I would not have to make any hardcoded changes to, and which would update when a new item was needed to be added (item4, item5, item6, etc). So what we have so far is a form that contains entry fields and labels, both dynamically listed from table1, in this format: fruit #1: [item1 ] fruit #2: [item2 ] fruit #3: [item3 ] The form populates from table1, as it displays the label and the item name in the field. What I want to do from here, is have a user fill this form out and input the data from the form into table2. However, I cannot come up with the logic on how to do this. I can provide more info if needed, but I hope someone has done a form like this before. thanks
I don't understand the need of table2. If you want to insert user input from the form to the table, just insert (SQL). What's the problem?