Skip to content

seikan/Session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Session

This is a very simple PHP session library.

Usage

Configuration

$session = new Session( [string $sessionId] );

// Include core session library
require_once 'class.Session.php';

// Initialize session object
$session = new Session();

Set Value

Gets a session value.

$session->set( string $key, string $value );

// Store username into session
$session->set('username', 'seikan');

// Remove a session variable
$session->set('password', null);

Get Value

Gets a session value by key.

string $session->get( string $key );

// Get username stored in session
$username = $session->get('username');

Destroy Session

Destroys the entire session.

$session->destroy( );

$session->destroy();

About

A very simple PHP session library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages