|
-
September 2nd, 2008, 09:52 PM
#1
Using the Session scalar array?
For one, I've never used it before, but considering I'm going to create a login system for administration on my site, I'll need to.
Session variables follow when the referrer is the same site?
I'm just not grasping on the concept.
By the way, I'm not formally trained, and quite young for a programmer/dev.
-
September 3rd, 2008, 08:28 AM
#2
Re: Using the Session scalar array?
Session variables are only accessible by the web server which creates them. All sessions should have an ID or name assigned to them that way the separate sessions can be tracked. Then, you don't have to worry about session stealing.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
September 18th, 2008, 08:35 AM
#3
Re: Using the Session scalar array?
Yes, ensure that you have a good schematic for your session handling as well. You may want to make a session wrapper to ensure each opened session variable is handled properly.
(a little abstract, but thought it may be useful when creating this instead of waiting down the road when you have 800 session variables being set and destroyed in 700 different files )
-
October 2nd, 2008, 06:40 PM
#4
Re: Using the Session scalar array?
Simply create a class (something like "mySession.class.php"), that holds appropriate members as well as methods that access those members. You, then, may decide to persist all that info in a db or just handle them (the infos) in memory. Which way ever, if you take an OO approach you don't need to worry about Cookies, IDs, tracking, and so on. Just have a "check-up-script" ready on top of EACH page call - could even be a FUNCTION that checks for existence/non-existence of your session class being instantiated or not... And you're safe.
ariell
programming is understanding
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|