Re: update problems
| From: | Paul Burney | Date: | Thu, 26 Apr 2001 18:24:21 +0000 |
| Subject: | Re: update problems | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8923@lists.php.net to get a copy of this message | ||
on 4/26/01 11:16 AM, ns (nils.s@techfuturum.landskrona.se) wrote:
> hi
> i got to have data from mysql database to drop down menues in html how do i
> do that?
> I can´t get any data to my drop down menues...
You need to run a query, something like:
SELECT DISTINCT from TABLE where SOMETHING
and they run a while loop to drop the values into a select field, i.e.,
echo '<option value="' , $row['fieldname'] , '">' ,
$row['fieldname'] ,
'</option>';
You may want to check out a small script I wrote:
<http://webdevel.burney.ws/code/id?14>
Hope that helps,
Paul Burney
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Paul Burney
Webmaster and Open Source Developer
Educational Technology Unit
Graduate School of Education and Information Studies
University of California, Los Angeles
(310) 825-8365
<webmaster@gseis.ucla.edu>
<http://www.gseis.ucla.edu/>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++