PHP Classes

File: usagedescription.txt

Recommend this page to a friend!
  Classes of Hasin Hayder  >  phpFormGenerator  >  usagedescription.txt  >  Download  
File: usagedescription.txt
Role: Documentation
Content type: text/plain
Description: Detailed Example
Class: phpFormGenerator
Generate code to process form and insert MySQL row
Author: By
Last change:
Date: 17 years ago
Size: 1,279 bytes


Class file image Download
phpFormGenerator is a class file which dynamically creates input form from mysql table or your query and a handler routine that automatically handles your input and insert them into table. A basic validation is also included. Following is the usage of phpFormGenerator.

	$prg = new phpFormGenerator();
	$prg->width = "100%";
	$prg->cellpad = "0";
	$prg->cellspace = "0";
	$prg->border = "0";
	//Decoration End

	//Which fields are available in input form?? this comes from
	//following query
	$res = mysql_query("select * from classtest");
	//Or you may say (select id, roll, name from classtest)
	//Pass the resource to FormGenerator
	$prg->mysql_resource = $res;
	//login information for the handler PHP
	//login and necessary info end
	//This is the key field that user must type. If its empty, record
	//will notbe inserted into table and an error message will be
	//Now generate The form file.
For more information send a message to info at phpclasses dot org.