#!\perl\bin\perl.exe -w use strict; use CGI qw(:all); my $cgi = new CGI; #usernames and passwords my %login = qw(antonis koukou giannis zabon); my $user = param("user"); my $pass = param("pass"); print $cgi->header. $cgi-> start_html(); if ($pass eq $login{$user} && $pass && $user) {#Add && $user && $pass print $cgi-> p("Welcome back $user"); }else { print $cgi-> p("Sorry invalid username or password"); } print $cgi->end_html;
In reply to Re: cgi problem
by JamesNC
in thread cgi problem
by atnonis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |