PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Wieger B   Session class   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Test file
Class: Session class
Session management wrapper class
Author: By
Last change:
Date: 20 years ago
Size: 426 bytes
 

Contents

Class file image Download
<?php
session_start
();
error_reporting(E_ALL);

// including everything
include 'libs/sess.php';

// loading
$sess = &library_session::start();

// check if we done that
if ($sess->initialised == FALSE)
$sess->initialize();

// Setting a var with it's value..
$sess->set('userName', 'John Doe');

// getting it again and showing it.
echo $sess->get('username');

// clear everything
$sess->drop();
?>