creating dropdown lists from fetched arrays.

From: Date: Sun, 24 Feb 2002 22:39:52 +0000
Subject: creating dropdown lists from fetched arrays.
Groups: php.general 
Request: Send a blank email to php-general+get-86017@lists.php.net to get a copy of this message
Hi, I want to create a dropdown list with options from a table. ie <HTML> <BODY> <?php $sql_select = "select * from dropdown_options"; $results = mysql_query($sql_select); while ($row = mysql_fetch_array($results); { echo "<option VALUE=$row["col1"] NAME=option1>" } </BODY> </HMTL> I know this is basic but it is to give you an idea of what I want. I have tried to find an example of this in the book I am using to learn to no result. I am guessing this is how it works from the info I have read from the book. Can someone put me on the right path. Thanks, Matt.

« previous php.general (#86017) next »