A user called ' or 1=1 -- could probably login without a password. That should really be:my $sth = $dbh->prepare("SELECT * FROM $users_table WHERE username = ' +$username' AND user_password = '$userpass'"); $sth->execute;
my $sth = $dbh->prepare("SELECT * FROM $users_table WHERE username = ? + AND user_password = ?"); $sth->execute($username, $userpass);
In reply to Re: Debugging a login script using MySQL
by Thilosophy
in thread Debugging a login script using MySQL
by coldfingertips
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |