my $adminpassword = "test"; my %cookie; my $pass = cookie('cookie'); require SDBM_File; my %mail; my $person = url_param('lookup'); if ( !exists $cookie{'pass'} ) { if ( param() ) { my $adminpass = param('admin'); if ( $adminpass eq $adminpassword ) { my $cookiename = cookie( -name => 'cookie', -value => 'loggedin', -path => '/', -expires => '+3y' ); print header, start_html(); # print rest of page here print "you are logged in"; ##### database value lookup if ($person) { if (exists $mail{$person}) { my $lookup_data = $mail{$person}; print "$lookup_data"; } else { print "