PHP Classes

File: extra/examples.php

Recommend this page to a friend!
  Classes of Michael Burgess   Form Table Generator   extra/examples.php   Download  
File: extra/examples.php
Role: Example script
Content type: text/plain
Description: Examples of Use
Class: Form Table Generator
Generate forms to add or edit MySQL table records
Author: By
Last change:
Date: 18 years ago
Size: 828 bytes
 

Contents

Class file image Download
<?php

/**
 * Example uses, return as string or to file
 * All files GPL v2 (inc. this one)
 *
 * @author Michael J. Burgess
 * @package FTG.examples
 */

require('../FormTableGenerator.class.php');

$link = mysql_connect('locahost', 'root', ''); //change as appropriates
mysql_select_db('anyDB', $link); //ditto

$FTG = new FormTableGenerator($link);

echo
$FTG->generatePage('anyTBL', 'Add'); //any tbl, literally, any table (though make sure all types are accounted for, see manual)
echo $FTG->generatePage('anyTBL', 'Edit');

echo
$FTG->generateTable('anyTBl', 'Add'); //string representation

/*

If people would like further examples, e.g. of hacks / xml config edits request some on the suppot forum, or by email.
I have limited time, thus will only provide extras if people want them.

*/
?>