Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php3

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Richard Fairthorne  >  oracle_sessions  >  test.php3  >  Download  
File: test.php3
Role: ???
Content type: text/plain
Description: Test File
Class: oracle_sessions
Author: By
Last change:
Date: 2000-07-16 15:35
Size: 877 bytes
 

Contents

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

//Open connection to db
connect2db();

//Start session
s_start();
//Delete old sessions
s_gc(1440);

//Initialize the vars
$name = "Christoph";
$mail = "php@chkassen.de";

//Register the variables
s_register("name");
s_register("mail");

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

//Testing the unregister function
// s_unregister("mail");

//Testing the isregistered function
if(s_isregistered("name") == 1)
{
	print "Name is registered\n<br>";
}

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

//Saving session data to database
s_save();
?>