Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the codeif ((!($username eq 'sugar')) && (!($password eq 'spice'))) print "you have entered a wrong password!"; }
#! /usr/bin/perl use strict; use DBI; use CGI qw(:standard); my($cgi); $cgi = new CGI; use CGI::Carp qw(fatalsToBrowser); my ($title) = "DB: Log in"; print $cgi->header (); print $cgi->start_html (-title=>"$title", -BGCOLOR=>"#ccddff", -style=>{'src' =>'style1.css'}); print "<table width=600 bgcolor=ffcc66><tr><td><b><i> DB: Log in</i></ +td></tr></table><p>"; my $username; my $password; print "<FORM METHOD=\"post\" ACTION=\"http://hostname/~user/cgi-bin/da +tabase/homepage.cgi\">"; print "<TABLE><TR VALIGN=\"baseline\"><TD VALIGN=\"baseline\"><h3>Ente +r user name</h3></TD><TD><INPUT TYPE=\"TEXT\" NAME=\"username\" SIZE= +\"10\"></TD></TR><TR VALIGN=\"baseline\"><TD VALIGN=\"baseline\"><h3> +Enter password</h3></TD> <TD><INPUT TYPE=\"password\" NAME=\"password +\" SIZE=\"10\"></TD></TR><TD><INPUT TYPE=\"SUBMIT\" value=\"Log in\"> +</TABLE></FORM>"; $username = param('username'); $password = param('password'); print $cgi->end_html ();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI + password problems
by jasonk (Parson) on Feb 19, 2003 at 13:55 UTC | |
|
Re: CGI + password problems
by rdfield (Priest) on Feb 19, 2003 at 14:00 UTC | |
|
Re: CGI + password problems
by OM_Zen (Scribe) on Feb 19, 2003 at 15:24 UTC | |
|
Re: CGI + password problems
by Coruscate (Sexton) on Feb 20, 2003 at 06:58 UTC |