Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can anybody see why this code isn't working? I would greatly appreciate any help you can give. Thanks} # Display error if username or password fields are left blank if($user_name eq "" || $password eq "") { &error(); } else { #check if the user name and password are in the database $sth = $db->prepare(q{SELECT user_id, password from user where user_id + = ?}) $sth->execute($user_name) while(@row = $sth->fetchrow_array){ if($user_name eq $row[0] && $password eq $row[1]) { #go to main page } else { # If the username or password are not in the database + if($user_name n +e $row[0] || $password ne $row[1]) + { &error(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: login page
by graff (Chancellor) on Dec 19, 2006 at 02:42 UTC | |
by mikeB (Friar) on Dec 19, 2006 at 15:28 UTC | |
|
Re: login page
by GrandFather (Saint) on Dec 19, 2006 at 02:21 UTC | |
by Anonymous Monk on Dec 19, 2006 at 02:34 UTC | |
by GrandFather (Saint) on Dec 19, 2006 at 02:40 UTC | |
|
Re: login page
by jettero (Monsignor) on Dec 19, 2006 at 02:13 UTC | |
|
Re: login page
by stonecolddevin (Parson) on Dec 19, 2006 at 02:56 UTC |