PDA

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


misterfade
06-22-2005, 10:09 AM
Hi,

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:

chdir("/path/to/forums/");
require('./global.php');
include('./includes/functions_user.php');
$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.
Thanks.

Marco van Herwaarden
06-22-2005, 11:13 AM
Start by changing '&&' by 'AND'.

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

misterfade
06-22-2005, 12:01 PM
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?