So, I have this form where people enter the contact info for a group and then all of the group information following for up to 15 people. I write this info to 2 databases, once for the contact info and then then another with the individual peeps. Now, I don't know why I'm having such trouble with this, but how do I cycle thru the form data until I run into an empty set of data to post to the db? For instance, in the second post (using the id from the first post as a reference field), let's say I have Name, Gender, Age and Grade, so coming from the form I have:
Name1, Gender1, Age1, Grade1
Name2, Gender2, Age2, Grade2
etc.
up to
Name15, Gender15, Age15, Grade15
Now, perhaps only thru Grade10 has data in it. How do I:
1)Cycle thru the form data and
2) Stop when I hit an empty set of data?
I know this isn't difficult, but my brain just isn't working right now, so any help you can give me would be greatly appreciated.
Thanks,
Willie
Name1, Gender1, Age1, Grade1
Name2, Gender2, Age2, Grade2
etc.
up to
Name15, Gender15, Age15, Grade15
Now, perhaps only thru Grade10 has data in it. How do I:
1)Cycle thru the form data and
2) Stop when I hit an empty set of data?
I know this isn't difficult, but my brain just isn't working right now, so any help you can give me would be greatly appreciated.
Thanks,
Willie