# !perl
use CGI qw(:standard); # use the CGI libraries
print header; # start the html output
$username = param('username'); # take
$password = param('password'); # take
open(FILE, "./users/$username"); # open the user's file in $users
$passhash = ; # read the password hash from the file
close(FILE); # close the file
if (crypt($password, $passhash) eq $passhash) {
print "You are now logged in.";
} else {
print "Incorrect username or password, please try again.";
}