[thelist] best way to check for valid user/password in PHP - oops 1 more qu..
Tom Dell'Aringa
pixelmech at yahoo.com
Thu Jan 9 13:56:02 CST 2003
--- Jason Handby <jasonh at pavilion.co.uk> wrote:
> Why not do
>
> SELECT password, username FROM reguser WHERE username =
> '$username' AND
> password = '$password'
>
> and then just see if any records are returned?
Oops, forgot to ask - if I do that and use:
if(!mysql_numrows(@mysql_query($result)))
{
// you screwed up dude
}
how do I get my row info later? Since I have to take out the
@mysql_query() from my $result query..its now $result = "SQL here";
So now, I can't use $row = mysql_fetch_array($result); to get my rows
since $result isn't a valid query... I get this error:
Warning: Supplied argument is not a valid MySQL result resource in
/home/sites/site35/web/reg/login.php on line 37
which is my $row line...
Tom
=====
var me = tom.pixelmech.webDeveloper();
http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
More information about the thelist
mailing list