PHP Classes

File: test.php

Recommend this page to a friend!
  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: 23 years ago
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(); ?>