Re: populating drop down from MySQL
i am supposing that u know how to create a databse connection using php. and u have the required field from the table in a resource. If you dont then tell me.
<SELECT NAME="someName">
<?PHP
while($row = mysql_fetch_array($resource, MYSQL_ASSOC))
{
?>
<OPTION VALUE=<?PHP echo $row['field']; ?>><?PHP echo $row['field']; ?>
<?PHP
}
?>
</SELECT>
Last edited by bayazidahmed; 21st July 2008 at 07:51 PM.
|