I don't get the question.. you just have to compare the values out from the database with the values from the user input.
my $sth = $dbh->prepare("SELECT usremail, usrStatus from users where usrName = ?"); $sth->execute(param{'name'}); my ($email,$status) = ($sth->fetchrow_array); print "invalid login" if (param{"email"} ne $email || $active ne 'Y'); Something like that, not tested at all. HTH Etienne Steve Osborne wrote: > > I am trying to validate a user in a login form. > There are 3 things that must be true. > > User login name = email_login (from User table) > User password = password (from User Table) > User must be active: activeuser (from Owner table) = 'Y' > > I don't know why I'm having so much difficulty with this SQL statement, but > can anyone help? > > Steve > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- Etienne Marcotte Specifications Management - Quality Control Imperial Tobacco Ltd. - Montreal (Qc) Canada 514.932.6161 x.4001 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php