You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Scott Chapman <sc...@lund.com> on 2000/06/14 21:55:48 UTC
Passing an array to a web form in EmbPerl?
Hello,
I have a situation where I am dealing with a non-normalized
database of computers sytems and want to pass the computer
systems to a web form as an array.
Say I have this:
field1 = Sytem 1 info
field2 = Sytem 2 info
field3 = Sytem 3 info
I want to call a EmbPerl script something like this:
www.host.com/script?systems={field1,field2,field3}&otherparm=othervalue
so that I can access the systems array in my embperl script.
Can I do this? What syntax would I use?
would this work: ?
www.host.com/script?systems=field1&systems=field2&systems=field3&otherparm=othervalue
TIA,
Scott
RE: Passing an array to a web form in EmbPerl?
Posted by indrek siitan <tf...@mysql.com>.
Hi,
> I want to call a EmbPerl script something like this:
> www.host.com/script?systems={field1,field2,field3}&otherparm=othervalue
> so that I can access the systems array in my embperl script.
you can do:
www.host.com/script?system=field1&system=field2&system=field3
in this case you'll get a tab-separated list into $fdat{system} which
you can easily spread into an array with split.
Rgds,
Tfr
--==< tfr@mysql.com >==< MySQL development team >==< Thibodaux, LA / USA >==--