GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • View on GitHub

This view

  • Original page
  • New address

GeezerVison is showing unicframework.github.io — Session

Session

A sessions provide way to store information about the user across multiple requests.

Use session middleware to use session:

$app->use($app->session());

Set session data:

// Set new session data
$req->session->set('email', '[email protected]');

Get the session data:

// Get session data
$req->session->get('email');

Check session data exists or not:

// Get session exists or not
if($req->session->has('email')) {
    // Session data exists
} else {
    // Session data not exists
}

Delete the session data:

// Delete a session data
$req->session->delete('email');

It will delete only session variable data.

Delete the all session data:

// Delete all session
$req->session->destroy();

It will delete all session data.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.