Passing user ID via sessions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
cap2cap10
Forum Contributor
Posts: 158
Joined: Mon Apr 14, 2008 11:06 pm

Passing user ID via sessions

Post by cap2cap10 »

:banghead: This may seem simple but I am having trouble accessing member data from the database table. How do I get and pass userID from Mysql database after I log into sessions?

Any takers?

Batoe
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Passing user ID via sessions

Post by Christopher »

Code: Select all

session_start();
$_SESSION['user']['id'] = $user['id'];
 
(#10850)
Post Reply