<?php
print "<body bgcolor=\"#c0c0c0\">\n";
require_once("person/person_class.php");
$person = new Person("piti","champeethong");
$person->setAge(23);
if(! $person->Save("person/person.dat",$person,false)){ echo "Can not save this person"; }
$person->Init();
$person->setName("wassana");
$person->setSurname("yamsang");
$person->setAge(22);
if(! $person->Save("person/person.dat",$person,true)) { echo "Can not save this person"; }
$person->Init();
$person->setName("pongpet");
$person->setSurname("meesub");
$person->setAddress("forture town");
if(! $person->Save("person/person.dat",$person)){ echo "Can not save this person"; }
if(! $person->Display('person/person.dat')) { echo "Can not display person"; }
?>
|