If I have the right-end of the stick then this is what you want:
$dropdown = "
<form method=\"post\" action=\"somescript.php\">
<select name=\"yourselect\">
<option value=\"selected\">--choose one--</option>";
while($row = mysql_fetch_array($result)) {
$var = $row['yourcolumn'];
$dropdown .= "<option value=\"$var\">$var</option>";
}//end while loop
$dropdown .= "</select></form>";
Just replace the name of the column 'yourcolumn' and $var to the
variable and column names you want to be pulled from the database.
Good luck and happy coding! :-)
Russ
On Thu, 26 Apr 2001 20:16:38 +0200 ns
<[EMAIL PROTECTED]> 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...
>
>
>
> thanks to anyone who can do this...
>
> ns
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
"Web Developers do it on-the-fly."
Russ Michell
Anglia Polytechnic University Webteam
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
t: +44 (0)1223 363271 x 2331
www.theruss.com
#-------------------------------------------------------#
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]