wright67uk Posted December 31, 2012 Share Posted December 31, 2012 I'm looking to put an existing mysql populated dropdown list on my page. I don't want the dropdown to display if it contains no results. Am I right in thinking that I should... Run the sql query Count the results Echo the dropdown menu within an if statement Eg. If results 1 or more then echo dropdown Am I on the right track? Or should I be looking at js? Link to comment https://forums.phpfreaks.com/topic/272540-display-dropdown-only-if-populated/ Share on other sites More sharing options...
Muddy_Funster Posted December 31, 2012 Share Posted December 31, 2012 you're thinking is fine, you don't need js for this. Link to comment https://forums.phpfreaks.com/topic/272540-display-dropdown-only-if-populated/#findComment-1402314 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.