Displaying user ID within their profile after login?

dsilegends

New Member
Messages
11
Reaction score
0
Points
0
I am trying to figure out how to add the user's id from the database to put in their profile. (EX: You are user: XX!)

I have usernames working:
PHP:
echo "Welcome to your profile, $_SESSION[username]!";

But I tried adding id instead of username, without luck. How would I do this?




Another thing, how would I show on the homepage "XX Users have currently registered!" ?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
You haven't provided enough information to answer your questions. When asking for help, describe in sufficient detail what you have (preferably with sample code) in addition to what you're trying to do and what's missing/not working. What else are you storing as session data? What's your DB schema (i.e. structure; table creation statements show this)? How does your site access the database?
 
Top