Re: Dynamic Forms and Arrays

From: Date: Sun, 07 Oct 2001 03:01:20 +0000
Subject: Re: Dynamic Forms and Arrays
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70268@lists.php.net to get a copy of this message
> I need some help with using arrays in a form. I am currently creating a > survey. The first page allows the user to select their skills from a list. > The second page generates an array and textboxes for each skill that was > selected on the first page. > For example, page 2 of user 1's form may have $skill_1, $skill_2 and > $skill_5 as arrays (with textboxes) and user 2 may have $skill_8, $skill_9 > and $skill_20. > > I would like to create an array that contains all of the user's arrays when > the form is submitted (i.e. $user_arrays=array($skill_1, $skill_2, > $skill_5) for user 1 and $user_arrays=array($skill_8, $skill_9, $skill_20) > for user 2. > > I have tried different ways of doing it, like creating the $user_array at > the same time I create the skills arrays, but when the form is submitted the > arrays are empty. You will lose a lot less hair if you do it the way the FAQ suggests: http://php.net/FAQ.php -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#70268) next »