php_begins Posted July 12, 2011 Share Posted July 12, 2011 Hi. I do not know if I am in the right forum, but here is my problem. I have 2 query results stored in $query1 & $query2. I need to display the result of the different queries below the header section depending on the select option. For example, <h3><small>Show:</small> <select> <option><? echo Option 1 ?></option> <option><? echo Option 2?></option> </select> </h3> If the user chooses Option 1 it should display $query1 below the <h3> section. If the user chooses Option 1 it should display $query2 below the <h3> section. Any help would be greatly appreciated! Link to comment https://forums.phpfreaks.com/topic/241850-displaying-different-queries-depending-on-the-select-option/ Share on other sites More sharing options...
requinix Posted July 12, 2011 Share Posted July 12, 2011 Do you care if the page refreshes? Link to comment https://forums.phpfreaks.com/topic/241850-displaying-different-queries-depending-on-the-select-option/#findComment-1242026 Share on other sites More sharing options...
php_begins Posted July 13, 2011 Author Share Posted July 13, 2011 thanks for the reply.Ideally I wouldn't want the page to refresh. But if it is too complicated, then I wouldn't mind that method either. If the page refreshes I would want it to take me to that <h3> section instead of the beginning of the page. Link to comment https://forums.phpfreaks.com/topic/241850-displaying-different-queries-depending-on-the-select-option/#findComment-1242045 Share on other sites More sharing options...
php_begins Posted July 13, 2011 Author Share Posted July 13, 2011 ok, I used jquery and did something similar to this page: http://www.danvega.org/blog/index.cfm/2008/7/1/jQuery-Select-Example Link to comment https://forums.phpfreaks.com/topic/241850-displaying-different-queries-depending-on-the-select-option/#findComment-1242247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.