On Tue, 3 Feb 2004, Justin French wrote:
> So, looks like I'm back to PHP logic.
> 
> I considered that I could store a simple array of required/etc field
> names to which I could check against when building the form from the
> mysql data, but my hope is that someone else has tackled something like
> this in the past, and can offer some advice...

I think your best bet may be to design some sort of object that defines
these tables/forms, that can be extended for each table/form or that
contains the definition and can be serialized somewhere... Doing it that
way would facilitate changing the underlying data source if necessary, and
it seems like a logical architecture.

The idea of autonomous database form creation is interesting, and your 
naming convention ideas are novel, but I have the same issue that you 
apparently do with that, it could come back to haunt you down the road..

Design the object well and it could validate the data automatically or
contain other non-database data such as form headings, help text, etc.

Also hooking this into some kind of form class (I like PEAR's
HTML_QuickForm) may help speed things along...

-- 
Kelly Hallman
// Ultrafancy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to