Hi PERL Monks,
I'm new to the DBI module and new to perlmonks.org. The DBI module is really nice.
You can do Database queries with MySQL, among others, but my problem is trying to match my query values with the user input.
This is my query below, but needs help.
### DECLARE VARIABLES my $uname = $FORM{'req_username'}; my $pword = $FORM{'req_password'}; ### DEFINE A MySQL QUERY my $sql = qq{SELECT * FROM $tablename WHERE username = '$uname' AND password = '$pword'}; my $sth = $dbh->prepare($sql); ### EXECUTE THE QUERY $sth->execute(); ### TEST THE USERNAME AND PASSWORD if(username ne '$uname' && password ne '$pword') # this does not work
Where do I test the username and password validity?
my validation check that I made does not work as intended.
I need some help with validation of the login form. Can anybody help me out?
In reply to DBI & MySQL Login Test by swordfish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |