Display data from table(s) with option to filter using drop down lists
-
Hi, am able to retrieve and display data from a custom database table in an HTML table using PHP file as a template for a WordPress post ($wpdb->get_results). Have retrieved entries to populate several drop down lists which I want to use to filter SQL query.
How do you go about passing the selected items in the lists back to construct your SQL string. Have tried adding a submit button and using the POST variable which is presumably the simplest way but if I specify the PHP file as the target action then I just get page not found errors – which seems reasonable as browser is trying to render an HTML page. How do I get the page to refresh on clicking the submit and access the selected items in the drop downs.
Should I be using some other method entirely to do the filtering? 30 years of programming and I’m scratching my head at this PHP stuff!
Any pointers would be gratefully appreciated.
- The topic ‘Display data from table(s) with option to filter using drop down lists’ is closed to new replies.