hello,
how could i populate drop down list from resultset of a mysql query??
ankit1122
-3
Junior Poster in Training
Recommended Answers
Jump to PostYou forgot:
1)To use the</option>
tag inside thewhile
loop.
2) To give a name to the option.
Change the while part to the following one.while($row=mysqli_fetch_assoc($result)) { echo "<option value='".$row['Database']."'>"; echo $row['Database']; echo "</option>"; }
Jump to PostPlease keep the discussion on site. State clearly what you want and we may be able to help. Asking contributors to search threads on other forums isn't really the way to go.
Jump to PostOK, well if you're happy with that, good luck. Many of us won't click links to external sites. Just a heads up.
All 10 Replies
v1shwa
0
Light Poster
abelingaw
69
Posting Whiz in Training
ankit1122
-3
Junior Poster in Training
ankit1122
-3
Junior Poster in Training
v1shwa
0
Light Poster
diafol
ankit1122
-3
Junior Poster in Training
diafol
ankit1122
-3
Junior Poster in Training
diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.