I have a form that lets users select multiple topics to post on. On submission from selecting their topics to post on, the next page will draw out the forms for them to fill in.
so far so good.
Now the next page (after they submit their filled in forms) will make sure the info is correct (or there at all) and then it will insert the values into a database one form at a time.
Here is where the problem lies.
I can grab all the values from all the forms using HTTP_POST_VARS....but I am stuck on how to insert values from one form, then grab the values from the next form, insert them, and so on. The way I am grabbing them allows me to get all of the values for ALL of the forms. I am not sure how to split the passed values into "sections" to then be inserted.
I am trying to use loops to do this (obviously) but I am stuck on how to get this done. I know there are 5 values per form, so I am using a for loop.
for (i=0; i<5; i++)
but, I am using:
list($key, $value) = each($HTTP_POST_VARS))
to grab the values from the HTTP_POST_VARS...
The problem is that once I have grabbed all of the values and I want to put them in the database....the names are the same, so the values are all messed up.
Also, I am not sure how many topics the user has selected, therefore I am not sure of the number to stop at (in the for loop).
Any elp would be appreciated.
I hope this is the correct forum to post in.
Thanks in advance.