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? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.