473,499 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple From Generator accessing MySql

Bob
I am sure this has been answered in over whelming detail in this group,
however the search results have not turned up any thing I am interested
in.

I want a simple form generator in PHP that accesses a Mysql database.

The program should (ideally in my opin):

Generate a form when given a database name and table.
Options for display only, insert new record, and edit.

This is for internal company use only. So it does not have to look
terribly pretty.

Most of the form generators I have found require a considerable amount
of coding to display a form nearly equal to what writing a form from
scratch would require.

I am looking for something like:

include('form_line_generator.php');

$db_name="my_database";
$table_name="customers";

$new_form= new form_line_generator();

$new_form->get_connection();
$new_form->set_database_name($db_name);
$new_form->select_db();
$new_form->set_table_name($table_name);
$new_form->run_columns_query(); // get the db columns names
from db
$new_form->generate_new_insert_form('notedit');

I started writing my own, but I am out of time!

Jul 17 '05 #1
3 1827
Bob wrote:
I am sure this has been answered in over whelming detail in this group,
however the search results have not turned up any thing I am interested
in.

I want a simple form generator in PHP that accesses a Mysql database.
Cut for Brevity


Try a Google for PHPClasses - there may or not be a be a space there

Hundreds of tools for forms and browsing
Have fun

Chris
Jul 17 '05 #2
Bob wrote:
I am sure this has been answered in over whelming detail in this group,
however the search results have not turned up any thing I am interested
in.

I want a simple form generator in PHP that accesses a Mysql database.

The program should (ideally in my opin):

Generate a form when given a database name and table.
Options for display only, insert new record, and edit.

This is for internal company use only. So it does not have to look
terribly pretty.

Most of the form generators I have found require a considerable amount
of coding to display a form nearly equal to what writing a form from
scratch would require.


Although I haven't used it myself, you might want to check out the PEAR package DB_Table :

http://pear.php.net/package/DB_Table

It can generate PEAR HTML_QuickForm forms from your tables.

Another PEAR alternative is DB_DataObject_Formbuilder.
Jul 17 '05 #3
Bob wrote:
I am sure this has been answered in over whelming detail in this group,
however the search results have not turned up any thing I am interested
in.

I want a simple form generator in PHP that accesses a Mysql database.

The program should (ideally in my opin):

Generate a form when given a database name and table.
Options for display only, insert new record, and edit.

This is for internal company use only. So it does not have to look
terribly pretty.
We may have what you want. We have a complete system generator that takes a
specification and builds a database and the web site to allow for
maintenance. Security and automation are built in from the ground up.

In many cases there is no programming. Here is a super-simple example of a
time-zone table. We do not expect users to populate that table themselves,
so we populate a table like that for them:

--------------------------------------------
--- BEGIN EXAMPLE SPECIFICATION ---
--------------------------------------------
TABLE,timezones,Time Zones,timezone,reference,risimple
COLINTAB,timezones,timezone,Time Zone,char,7,0,primary_key;uisearch
TABXCOLS,timezones,uisearch,_desc
TABXCOLS,timezones,uisearch,uisort
COLINTAB,timezones,timezone_hours,Offset Hours,int,0,0,uisearch
COLINTAB,timezones,timezone_mins,Offset Minutes,int,0,0,uisearch
COLINTAB,timezones,timezone_off,Computed Offset,
int,0,0,uisearch,
EXTEND,(@timezone_hours * 60) + @timezone_mins
(above 3 lines are actually one line)
PROJECT,timezones,dropdown,timezone_desc

CONTENT,timezones,I,timezone;timezone_hours;timezo ne_mins;timezone_desc,uisort
NZDT,13,00,New Zealand Daylight-Saving Time,170
IDLE,12,00,International Date Line, East,180
NZST,12,00,New Zealand Standard Time,190
NZT,12,00,New Zealand Time,200
.....
.....many more lines here :)
--------------------------------------------
---- END EXAMPLE SPECIFICATION
--------------------------------------------

Note the line beginning with "PROJECT", this names a projection, or named
list of columns. Whenever table timezones is used as a foreign key in
another table, the UI looks for the "dropdown" projection and if it finds
it it uses it to define a <SELECT> element for that column.

The column "uisort" is used to sort things whose natural order makes no
sense to people. So in a table of timezones you may want to force
"EST5EDT" to the top by giving it a vaue of zero in that table.

Most of the form generators I have found require a considerable amount
of coding to display a form nearly equal to what writing a form from
scratch would require.

I am looking for something like:

include('form_line_generator.php');

$db_name="my_database";
$table_name="customers";

$new_form= new form_line_generator();
Actually ours does not require any of this. We build systems entirely based
upon database operations, and so we assume that all of this is routine and
nobody wants to be bothered with it. You type the spec in notepad (or vim)
and feed it to the generator. Then you log in and start doing your
inserts, updates, and so forth.

I started writing my own, but I am out of time!


Now for the gotchas. The system builds PostgreSQL databases, not MySQL, and
we have no plans to target MySQL until they significantly upgrade its
abilities in the areas of triggers and query complexity.

Second is that the system, while it is very easy for us to use, has had no
effort made to make it usuable by anybody but those of us who created it
and use it. It may take some effort to get you up to speed, but you won't
have to worry about coding.

Finally, we believe it can only benefit us to have the system in use as
widely as possible, and so are happy to make easy terms (read: free) with
fellow developers who may wish to climb on board as early adopters.

--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5153
by: Harry Slaughter | last post by:
so i'm doing yet another mysql driven php app. same kind the rest of you build every day :) yes, it gets tedious having to write new code for each new DB that one works with. so this time i decided...
5
2285
by: Alex Glaros | last post by:
I need help on my basic table connection syntaxt using PHP. I call the php from a web browser url_name_goes_here/test.php. The database name is tennis and the user name is tennis. If I type...
3
4302
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
18
1899
by: Bob Cummings | last post by:
Not sure if this is the correct place or not. Anyhow in school we were taught that when trying to calculate the efficiency of an algorithm to focus on something called FLOPs or Floating Point...
7
3582
by: Kirk McDonald | last post by:
Let's say I have a function that takes a callback function as a parameter, and uses it to describe an iteration: def func(callback): for i in : callback(i) For the sake of argument, assume...
1
16469
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
0
1657
by: Tom | last post by:
I'm using the DB_DataObject script createTables.php to auto-generate the necessary database schema on two databases. Using the .ini approach (not the in-line PHP approach) to configure...
2
5993
by: mastahyeti | last post by:
I am working on a very large database application using MySQL and PHPMyAdmin. For this contract, I need to generate some very complex reports and i was wondering if any one knew of a free MySQL...
5
4823
by: Bobby Edward | last post by:
I've been researching ORM/Tier/DAL code generators. What do you recommend? It seems that subsonic (free) and LLBLGen Pro (paid) are the most popular. Any suggestions? I would prefer that...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7225
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7392
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3101
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.