Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mohammad Mostafa Shahreki  >  Session in DB  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example
Class: Session in DB
Manage sessions stored in a MySQL database
Author: By
Last change:
Date: 2011-05-13 23:02
Size: 824 bytes
 

Contents

Class file image Download
<!doctype html public "-//w3c//dtd xhtml 1.0 strict//en"
    "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
<!-- Copyright محمد مصطفي شهركي @ http://www.ncis.ir -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Session Set Save Handler DEMO</TITLE>
<META http-equiv="content-type" content="text/html; charset=utf-8"/>
<?PHP
    
require_once('sssh.class.php');
?>
</HEAD>
<BODY>
<?PHP
    $session
=new MySessionHandler('localhost','root','','session_db');
    
session_start();
    echo isset(
$_SESSION['test'])?$_SESSION['test']:'Test session is not defined';
    
$_SESSION['test']='http://www.ncis.ir';
    echo 
'<BR/>';
    echo isset(
$_SESSION['value'])?$_SESSION['value']:'value session is not defined';
    
$_SESSION['value']='http://www.NCIS.ir';
?>
</BODY>
</HTML>