Xidus has asked for the wisdom of the Perl Monks concerning the following question:
If anyone could help with this it would rock :)use strict; use HTML::Template; use CGI; my $login = "login <input type=\"text\" name=\"user\"> password <input + type=\"text\" name=\"pass\"> <input type=\"submit\" value=\"Submit\ +" name=\"submit\">"; my $template = HTML::Template->new(filename => "template"); $template->param(LOGIN => $login); ## Put an IF here after finding out + if they have a cookie / ticket :) ## $template->param(NAV => "blah blah"); $template->param(CONTENT => "woof woof"); my $cgi = new CGI; my $user = $cgi->param('user'); my $pass = $cgi->param('pass'); if ($user) { $cgi->start_html; print "Content-Type: text/html\n\n"; print "well HELLO"; $cgi->end_html; } else { $cgi->start_html; print "Content-Type: text/html\n\n", $template->output; $cgi->end_html; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple CGI Login
by blue_cowdawg (Monsignor) on Aug 30, 2006 at 23:40 UTC | |
by Xidus (Novice) on Aug 31, 2006 at 00:02 UTC | |
by blue_cowdawg (Monsignor) on Aug 31, 2006 at 00:06 UTC | |
by Xidus (Novice) on Aug 31, 2006 at 00:15 UTC | |
|
Re: Simple CGI Login
by thil (Sexton) on Aug 31, 2006 at 06:59 UTC | |
by Xidus (Novice) on Aug 31, 2006 at 13:40 UTC | |
|
Re: Simple CGI Login
by Anonymous Monk on Aug 31, 2006 at 11:49 UTC |