forwarding cgi->param()

X

xhoster

Colombo said:
hi,
how to forward parameters from $cgi->param() to another page when I
don't know how many parameters are there and how they are called?

Have the read the description of the param() method? If so, why don't
you know how many parameters there are and how they are called?

Xho
 
C

Colombo

hi,
how to forward parameters from $cgi->param() to another page when I
don't know how many parameters are there and how they are called?

Colombo
 
M

Michael Budash

Colombo <[email protected]> said:
hi,
how to forward parameters from $cgi->param() to another page when I
don't know how many parameters are there and how they are called?

Colombo

you normally don't forward or pass params to another page, but you do to
another script.

anyway, from your description of the problem, i'm going to guess that
you need to look into the CGI module's query_string() method.
 
D

David Efflandt

hi,
how to forward parameters from $cgi->param() to another page when I
don't know how many parameters are there and how they are called?

Not clear if you are generating another form and want to pass variables
through it, or attempting to redirect them to some other handler. But to
pass submitted variables through another form as hidden variables,
somewhere within the CGI generated form do something like:

foreach ($cgi->param) { print $cgi->hidden($_), "\n"; }

Of course you would need to make certain that and subsequent forms use
different field names so they do not get mixed up with previous fields.
And you could eliminate having to replicate '$cgi->' so often in your
script by using function method instead of object method.
 
K

krakle

David said:
Not clear if you are generating another form and want to pass variables
through it, or attempting to redirect them to some other handler. But to
pass submitted variables through another form as hidden variables,
somewhere within the CGI generated form do something like:

foreach ($cgi->param) { print $cgi->hidden($_), "\n"; }
Their is VARS..

my $FORM = $cgi->Vars;

now $FORM{'name'}
 
A

Anno Siegel

David said:
Yes a hash. Sorry.

According to "perldoc CGI" both work. A hashref (to a tied hash) is
returned to the scalar. An untied hash is probably preferable unless
you want to change variables through the hash, which is what the tie does.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top