Re: Perl And Apache.




it_says_BALLS_on_your_forehead wrote:
> 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:
>
> #!/usr/bin/perl
>
> 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.

.



Relevant Pages

  • Re: Perl And Apache.
    ... > After UserID/Password authentication on a web page, does Apache store the ... > UserID in an environment variable that a Perl script could use? ... if you are using the CGI module, you have access to any html form ...
    (comp.lang.perl.misc)
  • Re: How to verify a usnername and password?
    ... the perl script verify the combination first. ... intent to get every friends of mine different set of combination. ... perldoc -f crypt ... Note that userID and password administration can be a chore -- users ...
    (comp.lang.perl.misc)
  • Re: Foreach Code Issue
    ... > Windows Environment for a windows environment and I'm running ActivePerl ... As someone else pointed out you could just open the file directly in perl. ... You are overwriting the file for each $USERID ... close REPORT1; ...
    (perl.beginners)
  • Perl And Apache.
    ... After UserID/Password authentication on a web page, does Apache store the ... UserID in an environment variable that a Perl script could use? ...
    (comp.lang.perl.misc)
  • Re: Perl And Apache.
    ... >> After UserID/Password authentication on a web page, does Apache store the ... >> UserID in an environment variable that a Perl script could use? ...
    (comp.lang.perl.misc)