> I assume that the username field is text. You need to add single quotes
> around the field.
>
> $validate = mysql_query("SELECT username, user_password FROM users
> WHERE username='".$uname."'",$db);
>
Actually, it did help, and it didn't ;p
It would seem there is a scoping issue with the $db parameter. its giving a
not valid SQL-link because it no longer sees the db connection. It has to
do with the way the page calls itself I think... though it isn't very clear
to me. If I include the connect code for the db in the else block it
connects fine, and the simple select I have in the code sample works. But I
don't wanna have the db connect code in there if possible...I want the
connect code in one file only, and included on the header for the page...oh
well :)
If I figure out what is happening I will post it to this list.
Thanks for helping,
Keith.
> OR simply:
>
> $validate = mysql_query("SELECT username, user_password FROM users
> WHERE username='$uname'",$db);
>
> Hope this helps.
>
> Dan
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]