Re: form question
| From: | Monte Ohrt | Date: | Wed, 19 Jul 2000 13:41:38 +0000 |
| Subject: | Re: form question | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7263@lists.php.net to get a copy of this message | ||
It should be an array of values. On the form the html should look like:
<input type="checkbox" name=fila_art[] value="value1">
<input type="checkbox" name=fila_art[] value="value2">
<input type="checkbox" name=fila_art[] value="value3">
Then once the form is submitted, the values should be accessible
with $fila_art[0], $fila_art[1], etc... be careful about
variable scope, $fila_art will be undefined within a function
if it isn't passed or made global.
Monte
"Martin A. Marques" wrote:
>
> On Tue, 18 Jul 2000, Monte Ohrt wrote:
> > Ok, so would this work for you?
> >
> > echo(sprintf("<input type=\"checkbox\" name=fila_art[]
> > value=\"%s\"
> > checked>",
> > $fila_art[a_id]);
> >
> > Then you could just traverse the fila_art[] array in your php script.
>
> OK. I tried this after other trys, but when the action script is executed,
> fila_art is not defined. I'm clueless at this time! %-<
>
> Saludos... :-)
>
> --
> "And I'm happy, because you make me feel good, about me." - Melvin Udall
> -----------------------------------------------------------------
> Martín Marqués email: martin@math.unl.edu.ar
> Santa Fe - Argentina http://math.unl.edu.ar/~martin/
> Administrador de sistemas en math.unl.edu.ar
> -----------------------------------------------------------------
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/