Re: Check mysq_field_type, display appropriate FORM element

From: Date: Wed, 22 Oct 2003 23:36:24 +0000
Subject: Re: Check mysq_field_type, display appropriate FORM element
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167196@lists.php.net to get a copy of this message
I'm working on a general purpose database data editor in PHP which can allow users to edit what you want and also knows about linked record with no extra coding. I was planning on putting this kind of field typing and type checking in my code, but haven't gotten around to it yet. If you're interested, check out: http://rdbedit.sourceforge.net If you're interested in developing on it, contact me. René fournier wrote:
Hello everyone, I'm upgrading my simple CMS app, and would like to add a [simple] function to it—which I'm finding is no so simple (at least for me). To illustrate: The user clicks "Edit" on a particular table row. The CMS then fetches that row from the table and begins displaying the value of each field in a form (which the user can then edit and at then click "Update") . So far, so good. What I want to add is a function that will, depending on the field type (text, set, enum), display the field value as either a <textarea> or <select><option>. For example, for a field called "status", which is of type ENUM, and can contain the values "Online" or "Offline", I want this CMS function to return something like "<select><option>..." along with the allowed values, with the active one selected. Beyond this, I'd like to extend this check_field_type function to handle fields that contain links to images, etc. But this is where I need to start. Thanks. ...Rene


« previous php.general (#167196) next »