Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 01 Dec 2008, 20:11
Elenna Elenna is offline
Join Date: Jan 2006
Location: St. Charles, MO
Real name: Dana
New PHP File - Pulling Logged-in User ID?

I am trying to make a custom .php page for my site, and have the basics working (PHP file linked to template and displaying okay).

I am trying to pull some fields by linking to the currently logged-in user's UserID. In my select portion I am trying to have it pull the info using $bbuserinfo[userid] and $userinfo[userid], but neither is working.

I have also tried setting a variable to the above, and referencing the variable in the query, but that doesn't work either.

Is there a way to do this? I'm so sorry for the newbie-ish question!
Reply With Quote
Old 01 Dec 2008, 20:58
Lynne's Avatar
Lynne Lynne is offline
Join Date: Sep 2004
Real name: Lynne
If you want to pull the info of the person viewing the page, you would use $bbuserinfo. In order to use it though, you need to have global.php included in the page. See these articles - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Old 01 Dec 2008, 21:17
Elenna Elenna is offline
Join Date: Jan 2006
Location: St. Charles, MO
Real name: Dana
Many thanks! I had already tried one of those tutorials, but it apparently wasn't pulling the correct things. That error has been sorted out, now onto the actual coding!
Reply With Quote
Old 01 Dec 2008, 22:58
ReCom ReCom is offline
Join Date: Mar 2008

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only Show IP:Logged if user is admin or supermod, and disable Post report by user Fallout2man vBulletin 2.x Full Releases 32 30 Jul 2002 01:20

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

New To Site? Need Help?

All times are GMT. The time now is 21:54.

Layout Options | Width: Wide Color: