drop down list not populating
| From: | Montagna, Dan | Date: | Tue, 27 Jan 2004 19:31:13 +0000 |
| Subject: | drop down list not populating | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-175969@lists.php.net to get a copy of this message | ||
Hi
I've got the code for a drop down list and the drop down box displays--but
with no info in it. The underlying table is populated so I could use some
advice on what might be wrong from here....
<SELECT>
<?
include("includes/db.php");
MYSQL_CONNECT(HOST,USER,PASS) OR DIE("Unable to connect to database");
@mysql_select_db(DB) or die( "Unable to select database");
$query=("select * from community order by community");
$result=mysql_query($query) or die ("Unable to Make the Query:" .
mysql_error() );
while($row=mysql_fetch_array($result)){
echo "<OPTION VALUE=".$row['community']."</OPTION>";
}
?>
</SELECT>
Any ideas?
Thanks
Dan