PHP Classes

File: crncy.php

Recommend this page to a friend!
  Classes of Prakash Khanchandani   Table Maintenance   crncy.php   Download  
File: crncy.php
Role: Example script
Content type: text/plain
Description: 3rd level example
Class: Table Maintenance
Manage forms for CRUD MySQL table records
Author: By
Last change:
Date: 11 years ago
Size: 864 bytes
 

Contents

Class file image Download
<?php

/**
 * @author Prakash Khanchandani
 * @copyright 2013
 * @program crncy.php
 * @description currencies maintenance
 * @specialities - foreign key reference
 * - default column values
 */


session_start();
require_once (
"classes.php");


function
createTableObject()
{
   
$obj = new crncyTable;
    if (
$obj->getListAndColumns() === false)
        return
false;
    else
        return
$obj;
}


class
crncyTable extends mstrTable
{
    function
getListAndColumns()
    {
       
$this->tableName = 'currencies';

       
$result = parent::getListAndColumns();
        return
$result;
    }
}


if (!isset(
$_REQUEST['actn'])) {
   
$obj = createTableObject();
} else {
   
/* if the user has taken some action, handle it. */
   
$obj = handleRequestOption();
}


$form = new mstrFH($obj);
$form->setDemoNotes(crncyNotes());
$form->displayForm();
?>