I am trying to create a scalable form in php. I have lets say about 30 items being retrieved from a MySQL database into a php form which can be resubmitted back to make modifications to the database entries.
What I am having trouble doing is getting those items (as many as there will be) to go back into the database as sets of information of the same type. Here's an example:
Here is a set of information in a html table by row-
id name quantity color
Let' say I have 30 of these rows on this form page, I want to press submit and send it to a php page which intern takes those sets by row (I've run a for loop to assign each row identical numbers such as:
id0 name0 quantity0 color0
id1 name1 quantity1 color1
id2 name2 quantity2 color2
ETC....
How do I write a script which will submit these elements dynamically into the database as sets?
I tried doing a while-each display of the $_POST variables and it's fine, but I have no idea how I will get the elements into a database without hardcoding each element...
I appreciate the feedback!
Rninja
What I am having trouble doing is getting those items (as many as there will be) to go back into the database as sets of information of the same type. Here's an example:
Here is a set of information in a html table by row-
id name quantity color
Let' say I have 30 of these rows on this form page, I want to press submit and send it to a php page which intern takes those sets by row (I've run a for loop to assign each row identical numbers such as:
id0 name0 quantity0 color0
id1 name1 quantity1 color1
id2 name2 quantity2 color2
ETC....
How do I write a script which will submit these elements dynamically into the database as sets?
I tried doing a while-each display of the $_POST variables and it's fine, but I have no idea how I will get the elements into a database without hardcoding each element...
I appreciate the feedback!
Rninja
