building forms from what the MySQL table looks like

From: Date: Mon, 18 Mar 2002 09:45:26 +0000
Subject: building forms from what the MySQL table looks like
Groups: php.general 
Request: Send a blank email to php-general+get-88900@lists.php.net to get a copy of this message
Hi, I've been thinking about this for a while, and I think I'd get a lot of value out of a library which builds user-input forms from scratch, based on the MySQL table. If I had a simple table for a CD catalogue: id (INT 4) artist_id (INT 4) description (MEDIUM TEXT) price (VARCHAR 7) Then I'd love to be able to build a form for entry of each new CD, based on the column names and types in the above table: <FORM action="blah.php" action="post"> <B>artist_id</B>: <INPUT type="text" name="artist_id" value="" length="4" maxlength="4"><BR> <B>description</B>: <TEXTAREA name="description" rows="5" cols="40"><BR> <B>price</B>: <INPUT type="text" name="price" value="" length="7" maxlength="7"><BR> <INPUT type="submit" name="submit" value="submit"> </FORM> So, my question is, how do efficiently establish the data type, length and name of each field. The rest, I think I can handle :) Thanks in advance, Justin French

« previous php.general (#88900) next »