PDA

View Full Version : I can't figure this out!


Jaiem
Mon 23rd Sep '02, 4:43pm
It must be some very basic error but I just can't figure out this problem.

Here's the code:

$rj = "AA";
$jm = "BB";
if ( $username == $rj or $username == $jm )
{
$mems = ( "Members: " . $numbermembers . ", Threads: " . $totalthreads . ", Posts: " . $totalposts );
}
else
{
$mems = " ";
}

The result of the IF is always coming back as false. I'm sure the variable $username is populated properly.

What's wrong with my code?

Thanks.

Chen
Mon 23rd Sep '02, 4:49pm
If you are passing $username by URL or form you want to make sure register_globals is turned On, or user $_REQUEST['username'] instead.

Can't tell you more without seeing more code.

Jaiem
Mon 23rd Sep '02, 6:10pm
I'm not sure where $username is coming from. It's a vbulletin variable and I know all the other vbulletin PHP variables I've tried to access work in the PHP section of the STYLES control panel window.

My goal is I want to only display the number of users registered, total threads, posts etc for certain user ID's. All other users get a blank line in that place.

Any ideas?

MUG
Mon 23rd Sep '02, 6:33pm
I thought it was $bbuserinfo[username] :confused:

Jaiem
Mon 23rd Sep '02, 7:07pm
I got it. I had to put the PHP code in another area. It works fine now.

Thanks for the replies.