Re: HTML_QuickForm Question
| From: | Charles Kline | Date: | Tue, 25 Feb 2003 18:51:22 +0000 |
| Subject: | Re: HTML_QuickForm Question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3958@lists.php.net to get a copy of this message | ||
Sorry if I was unclear.
I am populating a SELECT with an array returned from a query. I have it working when I just have two values coming back from the query
SELECT id, lname
FROM table
but when I do this:
SELECT id, lname, fname
FROM table
the select which was working now shows 'array' for all the values. I did actually find a work around for this using concat(fname, ' ', lname)
in my select.
Here is another related question though. Is there a way to add a value to the beginning of the select? For example, since my values for the select are coming from a database, and I don't want the first name to be the first visible choice, how would I make that "Choose One" or something?
Thanks
Charles
On Tuesday, February 25, 2003, at 01:37 PM, Bertrand Mansion wrote:
<ckline@rightcode.net> wrote :Hi all, I am trying to work with html_quickform and have a question. I have a select that I need to populate from a query. I have this working now when I return just 2 values from the query. What I need to do is use one of the values 'userid' as the value="" and 'fname' 'lname' and the displayed value in the select. Anyone know how to do this?I don't understand your problem. Bertrand Mansion Mamasam