Reaper0167 Posted February 14, 2010 Share Posted February 14, 2010 I have a script that displays mysql results within a table. Lets say that the table has a column named Holidays. On my page I have 4 radio buttons named, (X-Mas, Halloween, Easter, Thanksgiving). Right now the table displays all the results from the table. Is it possible to click on one of the radio buttons (lets say Halloween) and have the page refresh and only show results from the holidays column named Halloween? I could make separate pages for each radio button, but that is just way too many pages. I think I'm looking to change the mysql query depending on what radio button is checked. Is there a name for this operation? Thanks. Link to comment https://forums.phpfreaks.com/topic/192056-displaying-mysql-results-using-radio-buttons/ Share on other sites More sharing options...
jl5501 Posted February 14, 2010 Share Posted February 14, 2010 you could have the page refresh by using the onclick event on the radio buttons. Also, you could use ajax to just load the relevant changes. Link to comment https://forums.phpfreaks.com/topic/192056-displaying-mysql-results-using-radio-buttons/#findComment-1012230 Share on other sites More sharing options...
Reaper0167 Posted February 14, 2010 Author Share Posted February 14, 2010 how about a list menu? Which ever is selected from the list menu, the mysql query would change therefore changing the table that is displayed? Link to comment https://forums.phpfreaks.com/topic/192056-displaying-mysql-results-using-radio-buttons/#findComment-1012256 Share on other sites More sharing options...
jl5501 Posted February 14, 2010 Share Posted February 14, 2010 you could do it that way as well, this time triggering off the onchange event, but the code after that would be similar Link to comment https://forums.phpfreaks.com/topic/192056-displaying-mysql-results-using-radio-buttons/#findComment-1012263 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.