DaWolf has asked for the wisdom of the Perl Monks concerning the following question:
So, isn't that stupid? Why one thing work and the other not? I've tried making this if statements in many different fashions, but none worked...#!c:/perl/perl use SysUtils; use CGI qw/:standard/; $login = param('login'); $pass = param('pass'); $dbh = SysUtils::Connect; $sth = $dbh->prepare_cached("SELECT login, pass FROM usuarios WHERE lo +gin='$login'"); $sth->execute; while(@row = $sth->fetchrow_array()) { if ($login eq $row[0]) { $l = "go"; if ($pass eq $row[1]) { $p = "go"; } else { $sth->finish; $dbh->disconnect; SysUtils::Response2User("erro.htm","<span class=\"erro\">I +nvalid pass.</span>","el","$login"); } } else { $sth->finish; $dbh->disconnect; SysUtils::Response2User("erro.htm","<span class=\"erro\">Inval +id login.</span>","el","$login"); } } $sth->finish; $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Basic var verification problem - I'm ashame to have to ask this...
by Fletch (Bishop) on Mar 25, 2002 at 02:39 UTC | |
by DaWolf (Curate) on Mar 25, 2002 at 02:49 UTC | |
|
Re: Basic var verification problem - I'm ashame to have to ask this...
by mattriff (Chaplain) on Mar 25, 2002 at 03:04 UTC | |
by DaWolf (Curate) on Mar 25, 2002 at 03:45 UTC | |
|
Re: Basic var verification problem - I'm ashame to have to ask this...
by DaWolf (Curate) on Mar 25, 2002 at 03:03 UTC |