Re: Variable $_POST vars?

From: Date: Sun, 11 Dec 2005 05:36:34 +0000
Subject: Re: Variable $_POST vars?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-227293@lists.php.net to get a copy of this message
I would do this instead <input name="item[$var]" size =60 class="formdata" value="item"> Increment the $var with the {number} that you are using. In the following PHP page You would do $var = $_POST['item']; $var would then be an array accessed the same way you would access it normally. Does that make sense.? On 12/10/05 9:27 PM, "The.Rock" <czimmerman01@hotmail.com> wrote: > Here is an example of one of the fields: > <input name="item{number}" size=60 class="formdata" > value="{item}"> > > I'm looping thru this form several times, so each time the name gets > incremented. Do you have an example of what your talking about? -- Stephen Johnson The Lone Coder http://www.ouradoptionblog.com *Join us on our adoption journey* stephen@thelonecoder.com http://www.thelonecoder.com *Continuing the struggle against bad code* --

« previous php.general (#227293) next »