elmas156 Posted April 21, 2011 Share Posted April 21, 2011 Hello everyone, I'm sitting here in a position where I can't work on my site or test any code, but my mind is racing about what I can do to solve a particular problem that I have. I won't get into the problem because it would take more time to type than I have right now, but I have an idea for a simple solution, just not sure if it will work or not. So, here's my question: Is it possible to have multiple session variables during a session? Such as: $email=$_SESSION['email']; $user=$_SESSION['userid']; If this is possible, my problem is solved (I think)... otherwise, I have to keep thinking about it. Thanks for any help! Link to comment https://forums.phpfreaks.com/topic/234395-multiple-session-variables/ Share on other sites More sharing options...
analog Posted April 21, 2011 Share Posted April 21, 2011 Yes, you can have multiple variables stored in a session. What you posted should work fine. Link to comment https://forums.phpfreaks.com/topic/234395-multiple-session-variables/#findComment-1204676 Share on other sites More sharing options...
kansasakki Posted April 21, 2011 Share Posted April 21, 2011 My son was asking what an array was. (He is 12 with a good 12 year old algebra base). An array is variable with pockets, you just have to know which pocket the data is stored in, was kind of the way I broke it down for him. I agree with analog, should be no problem. Kansas Link to comment https://forums.phpfreaks.com/topic/234395-multiple-session-variables/#findComment-1204680 Share on other sites More sharing options...
elmas156 Posted April 21, 2011 Author Share Posted April 21, 2011 Cool, thanks! Link to comment https://forums.phpfreaks.com/topic/234395-multiple-session-variables/#findComment-1204687 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.