How to get username from vbb db?
I have the proper db connect stuff all lined up, but the db refuses to spit data back at me. On my front page i have a login form and it auths against the vbb user info by way of a hack found here - works great. Then when the user visits after having the login cookie set, I want to print 'Welcome back $username' where the form would be. 'Welcome back ' shows but not the username i'm shooting for. That all works great, but for the life of me (and maybe i'm missing something simple) but I cant seem to pull data from the 'user' table of my vbb dbase. My query is $result=mysql_query("SELECT 'username' FROM 'user' WHERE userid='$bbuserid'"); The variable $bbuserid is set at the top of the php when it checks the cookies, so that works (and with myself logged-in, results with '2', my correct userid). How can I pull this user data from the database, or is there an easier way? I have a very customized login form that integrates with the site design so I'd rather not have to settle for the default vbb login.
|