Site hosted by Angelfire.com: Build your free website today!
#!/usr/bin/perl #Look! Look! This is the password!!!! Shhhhhh! Don't tell anyone! $password = "ministry"; # The following code deals with the form data if ($ENV{'REQUEST_METHOD'} eq 'POST') { # Get the input read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); # Split the name-value pairs @pairs = split(/&/, $buffer); # Load the FORM variables foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } } # Does the password equal what the user wrote? if($password eq $FORM{pw}) #If it does, open this file { $file = "CEMministrypage.htm"; open(FILE, $file); while() { print $_; } close(FILE); } Otherwise, print out this page else { print "Content-type: text/html\n\n"; print ""; print "Wrong!"; print ""; print "
Nope!

"; print "Click BACK to try again"; print ""; print ""; }