Re: From form to an array
| From: | DvDmanDT | Date: | Mon, 17 Nov 2003 21:02:37 +0000 |
| Subject: | Re: From form to an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170009@lists.php.net to get a copy of this message | ||
Hmm... Intresting... Like... Hmm.. Name the elements of the second form like
<input name="array1[LINE_NUM]"> <input name="array2[LINE_NUM]">
Then turn on register_globals, then you'll very automaticly have $array1 and
$array2..
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/w32.swen.a@mm.html
##########################
"Jeff McKeon" <jmckeon@telaurus.com> skrev i meddelandet
news:B3F5C378E4B6034CA27B15C99E9133CE7B1D07@exch01tc07927.telaurus.net...
Is it possible to pass the values of a form directly into an array?
I have a multi level, dynamic form. The first level (first form
actually) askes how many levels there are and gives you a field to enter
in that number.
Then upon submit of form1 it creates a new form (form2) that contains 2
fields for each level (the number of levels was entered in form1). So
if you entered 2 in the first form, you'd be given another form with 2
lines, each containing 2 fields.
Ok, now on submit of this second form I want to take field1 from each
line and put it into $array1 and field2 from each line and put it into
$arrray2.
Then pass those array's to a function as elements. Any idea how I can
do this?
Thanks,
Jeff