mattdope has asked for the wisdom of the Perl Monks concerning the following question:
Any ideas why this is happening? Thanks for many suggestions, matt#!/usr/local/bin/perl -Tw use CGI qw( :standard -debug); $testUsername = param( "username" ); $testPassword= param( "password" ); open( PW, "password.txt" ) || die( "The database could not be opened." ); while ( $line = <PW> ) { chomp( $line ); ( $username, $password ) = split( ",", $line ); chop($password); if ( $testUsername eq $username ){ $userVerified = 1; if ( $testPassword eq $password ) { $passwordVerified = 1; } } } close( PW ); print header(); print start_html("Checking password!"); if ( $userVerified&& $passwordVerified ) { print "Permissionhas been granted, $testUsername .<br>"; print "Enjoy the site!< br>" } elsif ( $userVerified && !$passwordVerified ) { print "You entered an invalid password. <br>"; print "Access has been denied. <br>"; } else { print "You have been denied access to this site.<br>"; } print end_html();
2006-07-14 Retitled by planetscape, as per Monastery guidelines
Original title: 'server error'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI Login script error
by ikegami (Patriarch) on Jul 13, 2006 at 20:23 UTC | |
by mattdope (Acolyte) on Jul 13, 2006 at 21:15 UTC | |
by Joost (Canon) on Jul 13, 2006 at 21:22 UTC | |
by mattdope (Acolyte) on Jul 13, 2006 at 21:36 UTC | |
by Joost (Canon) on Jul 13, 2006 at 21:43 UTC | |
by mattdope (Acolyte) on Jul 13, 2006 at 21:42 UTC | |
|
Re: CGI Login script error
by ptum (Priest) on Jul 13, 2006 at 20:32 UTC | |
by mattdope (Acolyte) on Jul 13, 2006 at 21:21 UTC | |
by Joost (Canon) on Jul 13, 2006 at 21:25 UTC | |
|
Re: CGI Login script error
by Joost (Canon) on Jul 13, 2006 at 20:26 UTC | |
|
Re: CGI Login script error
by cLive ;-) (Prior) on Jul 14, 2006 at 01:54 UTC | |
|
Re: CGI Login script error
by kwaping (Priest) on Jul 13, 2006 at 23:30 UTC |