McMaster Posted January 17, 2011 Share Posted January 17, 2011 Hi, I have a search form where users can search by age and country. Users can also save their search so they can go back and do it again but the problem is when they reload their saved search, I need it to select the country that has been saved in the drop down. So if someone searched the United Kingdom, I need it to show United Kingdom in the select drop down instead of (Select Country). Is there any easy and quick way around this? Many Thanks Link to comment https://forums.phpfreaks.com/topic/224728-select-country-from-dropdown-from-saved-search/ Share on other sites More sharing options...
BlueSkyIS Posted January 17, 2011 Share Posted January 17, 2011 save the country selection with the saved search criteria. Link to comment https://forums.phpfreaks.com/topic/224728-select-country-from-dropdown-from-saved-search/#findComment-1160764 Share on other sites More sharing options...
McMaster Posted January 17, 2011 Author Share Posted January 17, 2011 Yeah, but how exactly do I get the saved country to show in the select dropdown? That is my question. Link to comment https://forums.phpfreaks.com/topic/224728-select-country-from-dropdown-from-saved-search/#findComment-1160775 Share on other sites More sharing options...
BlueSkyIS Posted January 17, 2011 Share Posted January 17, 2011 if the stored country == a country option in the select, add selected='selected' to that option. Link to comment https://forums.phpfreaks.com/topic/224728-select-country-from-dropdown-from-saved-search/#findComment-1160778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.