Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Du  >  postgreSQL_session  >  test.php  >  Download  
File: test.php
Role: ???
Content type: text/plain
Description: sample file
Class: postgreSQL_session
Author: By
Last change:
Date: 2001-01-09 20:50
Size: 679 bytes
 

Contents

Class file image Download
<?php
//Sample file - Demonstrates the use of SessionCookie
require ("session.php");

$s = new sessioncookie();
//Open connection to db
$s->connect2db();

//Start session
$s->start();
//Delete old sessions
$s->gc(1440);

//Initialize the vars
//Register the variables
$name = "Christoph";
$mail = "php@chkassen.de";
$s->register("name");
$s->register("mail");

echo "After session_register() : \n<br><ul>" ;
echo "<li>  \$name = ".$name."\n<br>";
echo "<li>  \$mail = ".$mail."\n<br></ul>";

//Testing the isregistered function
if($s->isregistered("name") == 1) {
	print "Name is registered\n<br>";
}
//Saving session data to database
$s->save();
?>