View Single Post
  #4 (permalink)
Old 21st July 2008, 07:48 PM
bayazidahmed
CE - Regular Member
 
Join Date: 19th March 2007
Location: Jeddah, Saudi Arabia
I'm a Crazy Electronics and Communication Engineer
Posts: 74
Send a message via AIM to bayazidahmed Send a message via MSN to bayazidahmed Send a message via Yahoo to bayazidahmed
Default 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.
bayazidahmed is offline   Reply With Quote