Creating a UserID Variable in the Session - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-01-2010, 02:56 AM   #1 (permalink)
Junior Member
 
Join Date: Apr 2010
Posts: 8
Default Creating a UserID Variable in the Session

OK guys

Maybe my first question was not very clear, sorry for that. So here’s my problem.

Situation:

MySql Database contains: Username, Password & UserID

When the user logs in, their username is checked by the session and registered in the session variable. But I think this is captured from the text field when they login.

When the user makes a comment or other interaction with the site, their user name is logged from the session with the comment.

I would also like to have their UserID logged from the MySql Database.

How can I do this?

Thanks in advance
pedagog is offline   Reply With Quote
Sponsored Links
Old 09-13-2010, 04:40 PM   #2 (permalink)
Regular User
 
Join Date: Sep 2010
Posts: 30
Default Re: Creating a UserID Variable in the Session

$_SESSION['userid'] = $userid;
PradeepKr is offline   Reply With Quote
Old 09-13-2010, 04:43 PM   #3 (permalink)
Regular User
 
Join Date: Sep 2010
Posts: 30
Default Re: Creating a UserID Variable in the Session

BTW , it would be much easier if you paste you code here.
PradeepKr is offline   Reply With Quote
Old 11-26-2010, 02:23 PM   #4 (permalink)
Junior Member
 
BlueBoden's Avatar
 
Join Date: Feb 2009
Posts: 53
Default Re: Creating a UserID Variable in the Session

See also: PHP Sessions
BlueBoden is offline   Reply With Quote
Old 12-03-2010, 02:25 AM   #5 (permalink)
Regular User
 
Join Date: Dec 2010
Posts: 249
Default Re: Creating a UserID Variable in the Session

Nice update.........
roja is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:54 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting