Anyone know of a php lib / "method" that will allow me to give it a field/column name from a mysql database and have it create the appropriate html form input elements?
I'm trying to write a very generic function called
show_editable($column,$table,$record)
or whatever that would be smart enough to take just the info detailed
and figure out what kind of input types to display on the page... you
know like figuring it should be a text box if it's a CHAR, or a drop
down if it's an ENUM, or a bunch of checkboxes if it's a SET, etc,
etc. and populate it with the data from $record.
Similar in concept to the example attached to :
http://www.php.net/manual/en/function.mysql-field-type.php
But much more expansive.
Anyone know of a function(s) that have been written to do this, or, does anyone know why it would be a really Bad Idea?
I can't believe I am going to have to write this from scratch...
G