MySQL Forums
Forum List  »  Perl

Re: validating username and password in db???
Posted by: Nick Roper
Date: April 30, 2005 03:35AM


Is the emp_name column in the database table a unique key ? If not, then it is possible that more than one row is being returned. Your script is only fetching the data from the first row of $qry.

If the user_name is unique, then you shouldn't need to test for ($chkuser eq $name) as this must be true if the query is returning a row.

It might be worth trying:


print "name = $name , password = $password, md5password = $md5password";

just to see what is being returned


Nick Roper

Options: ReplyQuote

Written By
Re: validating username and password in db???
April 30, 2005 03:35AM
May 02, 2005 01:16AM
May 02, 2005 02:19AM
May 02, 2005 04:08AM
May 02, 2005 06:08AM
May 02, 2005 06:19AM
May 02, 2005 06:36AM
May 02, 2005 07:25AM
May 02, 2005 11:49PM
May 03, 2005 03:58PM
May 04, 2005 04:55AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.