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: 16 years ago
Size: 828 bytes


Class file image Download

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


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

$FTG = new FormTableGenerator($link);

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

$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.