Question
User Authetication in PHP question
I have a user authentication problem, and don't know what to
try next.
Here's my code -
$LoginRS__query=sprintf("SELECT UserName, UserPassword, UserIsAdmin FROM
users WHERE UserName=%s AND UserPassword=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password,
"text"));
$LoginRS = mysql_query($LoginRS__query, $connADT) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
die(mysql_num_rows($LoginRS)?'TRUE':'FALSE');
If I die($LoginRS__query), copy the string, and use a manual MySQL query to
search the database with it, it succeeds, and finds the proper record.
As you can see from the code, I also have a die(mysql_num_rows($LoginRS)),
and that returns a FALSE!
What the heck?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================
Here's my code -
$LoginRS__query=sprintf("SELECT UserName, UserPassword, UserIsAdmin FROM
users WHERE UserName=%s AND UserPassword=%s",
GetSQLValueString($loginUsername, "text"), GetSQLValueString($password,
"text"));
$LoginRS = mysql_query($LoginRS__query, $connADT) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
die(mysql_num_rows($LoginRS)?'TRUE':'FALSE');
If I die($LoginRS__query), copy the string, and use a manual MySQL query to
search the database with it, it succeeds, and finds the proper record.
As you can see from the code, I also have a die(mysql_num_rows($LoginRS)),
and that returns a FALSE!
What the heck?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================