Fooleeze Posted June 1, 2006 Share Posted June 1, 2006 First off, I suppose I'm technically still a beginner at PHP, and I'm also brand new to this forum. I created a site, and now I'm working on version 2. Version 1 used frames, with drop-down menus on the left to search my database of products. For example, a "Color" menu with choices of "All Colors, Red, Black, Green, White." (where "All Colors" is the default). When using frames, you could select one of these colors, hit submit, and the products would show up on the right based on your selection. The drop-down menu would still show the selection that you made (because this frame didn't reload or refresh, only the target frame refreshed). Worked fine, but I've been instructed to use 'include' files instead of frames, so I'm working on V2 now.Using 'include' files, the file that houses the drop-down menu now gets reloaded / refreshed each time I hit submit. So if I select "green" and hit submit, the table shows me the "green" items, but the drop-down menu is now reset to the default "All Colors." How do I get this drop-down menu to recognize what was selected and submitted, and show that in the drop-down when it is reloaded? My best example (not a website, but the same concept) would be in MS Word or MS Excel, when you use the 'drop-down' box to select a new font. When you select the font, the font you selected shows in the window until you change it. Hopefully my long-winded question makes sense, and I hope someone here can point me in the right direction. Thanks for your time.Todd Quote Link to comment https://forums.phpfreaks.com/topic/10980-drop-down-menu-with-include-files/ Share on other sites More sharing options...
Caesar Posted June 1, 2006 Share Posted June 1, 2006 How are you populating your dropdowns? If the dropdown is being populated by options stored in a database, and you have a while loop going...this would be easy. PM me and I may be able to help you. Quote Link to comment https://forums.phpfreaks.com/topic/10980-drop-down-menu-with-include-files/#findComment-41000 Share on other sites More sharing options...
Fooleeze Posted June 1, 2006 Author Share Posted June 1, 2006 The drop-downs are static html, not being populated from the database. But that could be done if it would be easier. It is a php file, and could access the database to create that drop down. But right now, I just put it in manually. Quote Link to comment https://forums.phpfreaks.com/topic/10980-drop-down-menu-with-include-files/#findComment-41003 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.