View Full Version : Trying to combine vbulletin + my own db

22 Jun 2005, 11:09

I have a page setup that anyone can see, but the info displayed depends if the user is logged in or logged in and part of a certain usergroup. That part I have down.

The top:

$session['sessionhash'] = fetch_sessionhash();

Where the login/info is:

if ($bbuserinfo['userid']!=0 && $bbuserinfo['usergroupid'] == 12) {

echo "Welcome!";

} elseif ($bbuserinfo['userid']!=0) {
echo "You do not have access to this section.";

} else {

Now I have a separate database that I created with a list of users, they have the same name as the forums, but it also contains lots of other stuff, which I want to display once they're logged in. How would I set it so that when that member logs into that page, it also shows them their info from the other database? I tried:

if ($bbuserinfo['userid']!=0 && $bbuserinfo['usergroupid'] == 12 && $bbuserinfo['username'] == $row_artists['username'])

but that doesn't work. I don't get any errors, it's just that it doesn't do what I want it to.

I know this seems confusing but if anyone can help me out it would be great.

Marco van Herwaarden
22 Jun 2005, 12:13
Start by changing '&&' by 'AND'.

And sorry i don't know what that $row_artists contain.

22 Jun 2005, 13:01
Why would I need to change '&&'? It's the same as AND, no?

$row_artists['username'] is just getting the username from the SQL query I created, I didn't think I had to post that code, should I?