Jump to content

Populating a drop down menu


prcollin

Recommended Posts

I have a form and it is a backend form that I am creating for a landscaping company.  Basically what it is is a way for them to create an invoice.  I want them to choose from a drop down list, then after that they click next and it populates the customer information based off of the customer name they chose from the list.  Right now i just need to know how to get a drop down menu to population with all of the customer names from my "customerlist" table.  Any suggenstions

Link to comment
https://forums.phpfreaks.com/topic/115348-populating-a-drop-down-menu/
Share on other sites

 

//connection to db

 

//ur sql stament

 

$result=mysql_query($qry);

 

echo "<select><option>Select One</option>";

 

while($row=mysql_fetch_array($result)){

echo "<option>$row[cust_name]</option>";

}

echo "</select>"

 

hope this is wat u want ^^

 

worked like a charm thanks

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.