prcollin Posted July 18, 2008 Share Posted July 18, 2008 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 More sharing options...
j007ha Posted July 18, 2008 Share Posted July 18, 2008 //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 ^^ Link to comment https://forums.phpfreaks.com/topic/115348-populating-a-drop-down-menu/#findComment-593032 Share on other sites More sharing options...
prcollin Posted July 18, 2008 Author Share Posted July 18, 2008 //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 Link to comment https://forums.phpfreaks.com/topic/115348-populating-a-drop-down-menu/#findComment-593037 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.