Session Handler classes 1.0
Session Handler classes implements a session but does not use MySQL as its storage mechanism like other session handling classes do. Instead it uses a directory structure where the session is identified as a directory and keys are files inside of that directory. Each file contains the value assoiciated with the key identified by the file name.
This session handler requires the use of non-persistent cookies which means it will create cookies on the user's machine, but the cookies will be destroyed when the user closes their browser.
This could be an issue because there are those people who have cookies turned off. If you use this class, you may want to detect whether the user has cookies enabled or disabled first. Then use the getURLSessionString function and place what is returned into your URL query string if cookies are turned off.
I have added a global variable outside of this class that creates a new instance of the session class. This was an attempt to make the session handling "hidden". Instead of creating an instance of this class, you can use the global $SESSION variable.
Note that Session Handler classes is not necessary if you are using PHP4 because there is already session handling incorporated into PHP4. Usage of this class is pretty simple. Since the global $SESSION object is created for you, there is no reason to create another instance of the object. Use $SESSION->register to register a key/value pair with the session handler for the correct session.
Use $SESSION->retrieve to retrieve a value from the session for a given key. If you need to get rid of everything in the session, call $SESSION->destroy which deletes the existing session and creates a new one.
If you want to only delete a key from the existing session, call the $SESSION->deleteKey function.
More popular User Management
- Login Script with PDO 1.0 (3 years, 8 months 22 days ago)
- PHP & Ajax Login Any Database 1.0.0 (2 years, 5 months 15 days ago)
- User Checker 0.9 (4 years, 8 months ago)
- gLogin 1.0 (4 years, 7 months 25 days ago)
- Free PHP User Registration Login System 1.0 (3 years, 4 months 26 days ago)
Listing Files

mUtility.inc- 2.0 KB
- 10/02/2005 22:46:32

Session.ini- 88 Bytes
- 10/02/2005 22:46:32

hUtility.inc- 148 Bytes
- 10/02/2005 22:46:32

TestSession.php3- 9.9 KB
- 10/02/2005 22:46:32

cSession.inc- 17.4 KB
- 10/02/2005 22:46:32

hSession.inc- 149 Bytes
- 10/02/2005 22:46:32
- FREE MySQL Cloud Database Super Simple, Zero-Management MySQL Cloud DB. Use It FREE!
- Pinterest clone Start your own pin board social network today. Get Pintastic and start your own pinterest clone network.
- MYRE Real Estate Software Professional Real Estate solutions by MYREPHP PROGRAMMING!
