Login   Register  
PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of sudhir vishwakarma  >  MySQL & Session  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Session Example
Class: MySQL & Session
Store and retrieve PHP session data in MySQL table
Author: By
Last change:
Date: 4 years ago
Size: 722 bytes


Class file image Download
 * @author sudhir vishwakarma <sudhir.vis@gmail.com>
 * @copyright Sudhir Vishwakarma  (www.itwebinfo.com)
 * @version 0.1 20100602
 * How to use :
 *  Create your database in MySQL, and create a table in which
 *  to store your session information.  The example code below
 *  uses a table called "session".  Here is the SQL command
 *  which created it:
 *  CREATE TABLE sessions (id varchar(32) NOT NULL,access
 *  int(10) unsigned,data text,PRIMARY KEY (id));
require_once "session.php";
$oSession = new Session();
print_r($_SESSION); // First
$_SESSION['hi'] = "Hello"// Comment this Once sessoin is set
$_SESSION['test'] = "great"// Comment this Once sessoin is set