mnlight has asked for the wisdom of the Perl Monks concerning the following question:
Anyway it was suggested to me that I use HTTP authentication to identify my users. so I got it figured out and set it up and it appears to be working very well. It is doing exactly what I need but my problem is I don't fully understand how to capture the login and then pass it to a second cgi script What I have done so far is this.
In the second script I am passing the login to I have coded this#!/usr/bin/perl -w #Volunteer.pl - Sign up sheet for Volunteers use strict; use DBI; use CGI qw('standard'); use CGI::Pretty; use CGI::Cookie; my $query = CGI::Pretty->new; #my $query = CGI::new; my ($dbh, $sth,$cookie,$sess_id); my @val= (); $cookie=$query->cookie(-name=>'user', -value=>$sess_id, -path=>'cgi-bin/Signup.pl', -expires=>'+3h'); print header(-cookie=>$cookie), start_html ("Volunteer SignUp Form");
I am thinking that $user will then be the user logged in.#!/usr/bin/perl -w #Volunteer.pl - Insert Volunteers into database. use strict; use DBI; use CGI qw(:standard); my $query = CGI::new(); my ($dbh, $sth, $count); my $name = $query->param("name"); my $date = $query->param("date"); my $number= $query->param("number"); my $parent= $query->param("parent"); my $user= $query->param("user");
Edit ar0n -- added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Capturing a secure login and sending it two s different cgi script
by japh (Friar) on Dec 22, 2001 at 14:19 UTC | |
by mnlight (Scribe) on Dec 22, 2001 at 20:30 UTC | |
by japh (Friar) on Dec 23, 2001 at 00:38 UTC |