They are strings,
before it would always say that the 2 values were equal,
but now it says they are always not....
Heres my code
#!/usr/bin/perl #<include:CGI.pm> #!/usr/bin/perl -w use CGI; my $query = new CGI; print "Content-type: text/html\n\n"; open FILE,$query->param('name'); @file= <FILE>; close FILE; if ($query->param('pass') eq @file[1]){ print qq[<HTML> <frameset cols="100%,290%"> <frame src="commands.cgi?name=]; print $query->param('name'); print qq[" name="commands"> <frame src="base.cgi?name=]; print $query->param('name'); print qq[" name="game"> </frameset> </HTML>];} else{ print qq[<HTML>Sorry, that was the wrong pass/name, please try again]; }
What I want it to do is open a file thats named the same as
the persons user name, then check if the passwords match,
I tried "print @file1" just to make sure I was checking the pass
and not something else. So Im 100% sure its checking the pass,
but now it says the passes arent equal...
In reply to Re: If
by MAS4891
in thread If doesn't work
by MAS4891
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |