RE: [PHP] form question
| From: | Lars Wilhelmsen | Date: | Tue, 18 Jul 2000 20:20:58 +0000 |
| Subject: | RE: [PHP] form question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7146@lists.php.net to get a copy of this message | ||
Hi again!
First - even if you generate the checkboxes, you can have full control
over the naming.
The variables is put into an associative array $HTTP_SERVER_VARS or
something.
(check the phpinfo() output).
Just traverse the array - and there you go.
Regards,
-larsw-
--
Lars Wilhelmsen <lw@ez.no>, developer @ eZ systems <www.ez.no>
-----Original Message-----
From: mohrt@ispi.net [mailto:mohrt@ispi.net]On Behalf Of Monte Ohrt
Sent: 18. juli 2000 22:17
To: Martin A. Marques
Cc: php-general@lists.php.net
Subject: Re: [PHP] form question
"Martin A. Marques" wrote:
>
> On Tue, 18 Jul 2000, Lars Wilhelmsen wrote:
> > Hi.
> >
> > Let's take an example form:
> >
> > <form action="foo.php4" method="post">
> > <input type="text" name="bar">
> > <input type="submit" name="go" value="Go!">
> > </form>
> >
> > Ok... when this form is submitted, you can access all the
fieldinformation
> > in php by taking the name you've placed in name="" and place a $ in
front
> > of it.
>
> Actually I happen to know that. Maybe I didn't explain my problem
correctly.
> The form is generated dynamically, so I don't know the name of the
variables
> on the INPUTs which are checkboxes. This form calls another php script
which
> gets the variables of these input checkboxes.
> How do I know the name of those variables?
>
> Thanks!!
>
Martin,
I've run into this problem many times myself.
I'm sure there are methods or hacks to achieve what you are asking, but
I usually try to figure out a better way to create my form so that it is
easier to parse, like making the form variable names consistant and
making the values dynamic, or putting hidden values along side of form
elements to track corresponding data.
What does your form elements consist of exactly?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net