Re: Question

From: Date: Wed, 21 Mar 2007 00:11:56 +0000
Subject: Re: Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-250956@lists.php.net to get a copy of this message
On Tue, March 20, 2007 12:46 pm, Dan Shirah wrote: > Looking for some direction here. > > I have a form that collects user data. When an employee opens the > form > they enter in all of the user data for an account, however the account > can > have multiple users so the employee has the option to "Enter another > user > for this account" and they can do this for as many users as the > account > holds. > > What I can't figure out is how to store the first set of user details, > have > the blank form come up again, store the second set of user details, > have the > blank for come up again, insert a third set of details and then have > all > three sets submit to the database at the same time. > > Did the make sense? > > Would using a session work to store all this user data for a single > submission? You could cram as much of that as you want into $_SESSION. Or, after the first user, create the account, and record the fact that any subsequent users are to be tied to that account_id, and simply keep track of the account_id from then on, for as many users as they want to add. It would probably be MUCH easier and cleaner to just track the account_id and re-use it than to try to do the inserts in one big mess at the end. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#250956) next »