CodeCanyon – PHP Database Session Class
Category: Plugins/Modules
- views: 9 443
- date: 24 August 2010
- posted by: SharePlus

PHP Database Session Class
Create user sessions with this easy to use class.
Each session is stored in a database and is locked to the current browser and ip address.
* Create Sessions
* Destroy Sessions
* Create Session Variables
* Access Session Variables
* Delete Session Variables
* View session data array
Example
// Include the class
require('session.php');
// setup database array
$config = array(
'host' => 'localhost',
'user' => 'root',
'pass' => 'root',
'db' => 'session'
);
// create a new class instance
$sess = new Session($config);
// create a new session
$sess->create();
// set a session value
$sess->set('key', 'value');
// and another
$sess->set('email', 'some@email.com');
// pull a session value
$email = $sess->get('email');
// delete a session value
$sess->drop('email');
// pull a raw session array
$session_array = $sess->raw();
// check if a session is active
$acheck1 = $sess->active();
// Save session info to a variable
$session_info = $sess->raw();
// destroy the session
$sess->destroy();
Each session is stored in a database and is locked to the current browser and ip address.
* Create Sessions
* Destroy Sessions
* Create Session Variables
* Access Session Variables
* Delete Session Variables
* View session data array
Example
// Include the class
require('session.php');
// setup database array
$config = array(
'host' => 'localhost',
'user' => 'root',
'pass' => 'root',
'db' => 'session'
);
// create a new class instance
$sess = new Session($config);
// create a new session
$sess->create();
// set a session value
$sess->set('key', 'value');
// and another
$sess->set('email', 'some@email.com');
// pull a session value
$email = $sess->get('email');
// delete a session value
$sess->drop('email');
// pull a raw session array
$session_array = $sess->raw();
// check if a session is active
$acheck1 = $sess->active();
// Save session info to a variable
$session_info = $sess->raw();
// destroy the session
$sess->destroy();
Demo:
http://codecanyon.net/item/php-database-session-class/full_screen_preview/111784
DOWNLOAD FROM HOTFILE:
http://hotfile.com/dl/64152518/6dfa9e1/Session-Class.zip.html
Please - don't forget to say - THANK YOU.
NO HOTFILE MIRRORS, PLEASE..! If you add HOTFILE MIRROR - IT WILL BE DELETED
We need your support!
Make a donation to help us stay online
Bitcoin (BTC)
bc1q08g9d22cxkawsjlf8etuek2pc9n2a3hs4cdrld
Bitcoin Cash (BCH)
qqvwexzhvgauxq2apgc4j0ewvcak6hh6lsnzmvtkem
Ethereum (ETH)
0xb55513D2c91A6e3c497621644ec99e206CDaf239
Litecoin (LTC)
ltc1qt6g2trfv9tjs4qj68sqc4uf0ukvc9jpnsyt59u
USDT (ERC20)
0xb55513D2c91A6e3c497621644ec99e206CDaf239
USDT (TRC20)
TYdPNrz7v1P9riWBWZ317oBgJueheGjATm
Information |
|||
![]() |
Users of GUESTS are not allowed to comment this publication. | ||









