divineright wrote in php 😊contemplative

Listens: John Coltrane - Summertime

Hello Everyone

Hi Everyone this is my second post, I deleted the first as I found the problem right after posting it. Thanks to all that answered.

I am writing a program that will dynamicly create HTML tables based on database tables. I do this by reading in the field names and lengths. Then I use those to create the input fields in the HTML form as well as the titles for the various input fields. I use a javascript to validate the form before inserting it into the DB. Another function that I have incorporated is that if the field name has the word select in it, I have a function that opens a corresponding table in the database and then generates an HTMl select list based on the data in the table.
For instance if the field name is selectAdmin the program would open a table called selectAdmin. This table would have 3 columns, selectKey, selectValue and selected. These would correspond to the HTML select list key, value and whether its selected or not.
My question to all of you is this; Does anyone see any pitfalls to what I am trying to do? It seems like a good idea, but it might just end up being a good exercise in programming.
I have only been messing around with PHP for a couple of months now so any comments and suggestions are welcome.
I want to post my code in LJ but I dont know how to do it without LJ trying to interpret the HTML portions.