Let me ask this question.. when passing variables from a HTMl form to a CGI
script do you need to do anything special to the environment.

The reason I ask is I took an html page off  server_1 and used the exact
script that they used on the server_1 to process the email.  Placed it on
Server_2 with the script and the variables did not pass but work fine on
Server_1

Thanks



-----Original Message-----
From: David Gray [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 12:42 PM
To: 'Perl'; 'Lance Prais'
Subject: RE: CGI QUESTION

> I have a question regarding passing variables from a HTML
> form to a CGI script.  I have never worked with CGI in the
> past and assumed that if I included the variables with in the
> form and on submit called the CGI script that the variable
> would be amiable to it.  That doe not see, to be the case. Is
> my assumption correct?
>
> I am attempting to use the variables by the following code:
>
> (param('account'))
>
> Is that correct?

Are you using the CGI module? When I grab what's passed by a form
submission, I usually save a copy of them in a hash (assuming no
multi-valued form elements will be present) like so:

-----
use CGI;
my $cgi = new CGI;

our %F = ();
$F{$_} = $cgi->param($_) for $cgi->param();
-----

You can now access your form values with $F{account}

Please post more code (from your cgi script where you're trying to
access the values passed from the form) if this doesn't fix your
problem.

HTH,

 -dave



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to