in reply to elsif loop
second - then you go over that row(s) and compare $username to the fetched userid. don't you trust your database? for what reason do you do a 'where userid = ?' anyway?
third - you're preparing $sth and execute $usr - a mistake?
my $sth = $db->prepare( q{SELECT userid, password from user where user +id = ?} ) or die $dbh->errstr; $sth->execute($username) or die $dbh->errstr; my ($uid, $pass) = $sth->fetchrow_array; if ($pass ne $hashPassword) { error(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: elsif loop
by Anonymous Monk on Dec 12, 2006 at 15:55 UTC | |
by nimdokk (Vicar) on Dec 12, 2006 at 17:26 UTC |