Re: Perl And Apache.
- From: "it_says_BALLS_on_your_forehead" <simon.chao@xxxxxxxxx>
- Date: 23 Oct 2005 18:23:31 -0700
> Morris.C wrote:
> > A quick Perl (or it could be Apache!) question:
> > After UserID/Password authentication on a web page, does Apache store the
> > UserID in an environment variable that a Perl script could use?
> > I've used a Perl script called 'test-cgi', but the UserID that it always
> > returns is "apache".
> > Any help would be appreciated.
> > Thanks.
> if you are using the CGI module, you have access to any html form
> values that you submitted through POST, or that you entered in the
> query string.
> so if on one page, you had a link (or form action to) /cgi-bin/page2.pl
> in page2.pl, you could have:
> use strict; use warnings;
> use CGI;
> my $user = param('user');
....sorry, that should be:
my $user = param('username');
in this example
> print "Content-type: text/html\n\n";
> print "$user<br>\n";
> ...if on the first page you had:
> <input type=text name=username id=username value="">
> something like that. the id is optional, but CGI requires that the html
> tag have a name attribute.
- Prev by Date: Re: Perl And Apache.
- Next by Date: Re: Perl And Apache.
- Previous by thread: Re: Perl And Apache.
- Next by thread: Re: Perl And Apache.