Page 1 of 1

Saving multiple users form data.

Posted: Fri Sep 30, 2011 11:53 pm
by rawrstin
This isn't as much of a problem as a question, but here it is...

I'm trying to figure out a good way to have one page for a application form, but I'm trying to figure out a good way to save more than 1 users field data. So I guess I have several questions...

1) What would be the best way to do this?
2) Could I save the field data within the form page, or would that not work... like "application.php?id=1"?
3) Should I save the data to a mySQL database? I don't really want to do this as there is a lot of applications. Our company has over 200 clients that have applications... So I'm trying to make this as dynamic as possible.

I guess I should provide some info on to how this works to make you understand a little bit easier.
A user logs in > goes to their profile... Clicks the applications still needed to be filled out.
Loads the form and has them fill it out.

Perhaps I should just have them submit the application to somewhere? I just don't know and I keep rambling on just trying to think of ideas, this is stressing me out so any help is much appreciated.

Re: Saving multiple users form data.

Posted: Sun Oct 02, 2011 7:13 pm
by jacek
I don't really get what you mean to be honest. You have a form that is being submitted and you need to store the data ? The best way to do that would generally be in a database table, so you would have one row for each user's submission.

Is the problem that you need to store the data from more than one form, but you don't always know the number of forms you have so creating a table for each one would be awkward ? In that case you do need to give each form an id like you suggested, you could either use GET as you said or a hidden form input
<input type="hidden" name="form_id" value="1" />
which would be sent along with the other form data. The value would come from the link they used to get to the form or maybe from a database.

Re: Saving multiple users form data.

Posted: Sun Oct 02, 2011 9:25 pm
by rawrstin
Jacek,
I'll try and explain the situation a little bit better for you to understand. I have members who are filling out applications through their profile and I need to save each users data simply. There are going to be quite a lot of applications considering the amount of clients we have, so I'm trying to find an easier solution rather than a database for each form. Or would a database be the easiest way? I don't really know, so that's why I'm asking you.

Re: Saving multiple users form data.

Posted: Mon Oct 03, 2011 9:12 pm
by jacek
Okay, a database would be the best solution, they are designed for storing data so doing it any other way would be a bit silly. You could create a table for each application form, which might make it easier to work with.