alternative way not using param('userid')

C

Carl Ogawa

The following will stop to open test.pl due to using param('userid') and
param('pwd').
Is there an alternative way to get data from HTML file to CGI file? I have
to do this in the particular situation.
-------- html file ---------
<form name = "form3" action = "http://localhost/scripts/test.pl" method =
post>
Name: <INPUT TYPE = text NAME = "userid" size=25 value="OGAWA"><p>
Password: <INPUT TYPE = password NAME = "pwd" size=12 ><p>
<input type = submit value = "Submit">
</form>
--------- cgi file (test.pl) ------ ActivePerl 5.8 --------------------
#!/usr/local/bin/perl

use CGI qw:)standard);
my ($user, $passwd);
$user = param('userid');
$passwd = param('pwd');
 
N

nobull

Carl Ogawa said:
The following will stop to open test.pl due to using param('userid') and
param('pwd').
Is there an alternative way to get data from HTML file to CGI file? I have
to do this in the particular situation.

It is totally unclear what is "this" and what is "the particular
situation".

The only way that user interaction with an HTML document (not
containing client side scripts) can communicate to something on the
HTTP server is to generate an HTTP request via a link or a form
submission. This has nothing to do with Perl (or indeed CGI) - it has
only to do with HTTP and HTML.

I suspect whatever it was you were trying to ask has nothing whatever
to do with Perl.

Random shot in the dark: The protool HTTP has a basic authentication
mechanism.
-------- html file ---------
<form name = "form3" action = "http://localhost/scripts/test.pl" method =
post>
Name: <INPUT TYPE = text NAME = "userid" size=25 value="OGAWA"><p>
Password: <INPUT TYPE = password NAME = "pwd" size=12 ><p>
<input type = submit value = "Submit">
</form>
--------- cgi file (test.pl) ------ ActivePerl 5.8 --------------------
#!/usr/local/bin/perl

use CGI qw:)standard);
my ($user, $passwd);
$user = param('userid');
$passwd = param('pwd');

This newsgroup does not exist (see FAQ). Please do not start threads
here.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top