PHP Classes
Icontem

File: extra/examples.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael  >  Form Table Generator  >  extra/examples.php  
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
 

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.

*/
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products