Retain search values in drop downs
Hi there I wonder if someone can assist?
I'm working on a search tool for a client with which customers can refine their view of specific products based on a number of options. There is a working demo at shredder-search.php which has both the search and results displaying on the same page.
I have this working to a degree, however when they make some selections and click the 'Search' button the relevant products appear but the drop downs return to displaying 'All' rather than the retaining the option the customer has just selected.
<option value="">All</option>
Could you please advise how I may resolve this issue?
An additional question about this, but regarding the URLs that are generated. All of the drop downs are populated from separate tables in the database and the options have a 'value' and a corresponding 'label', both of which are recorded in their respective tables. EG there is a table named 'Security' with two rows, the first has an id of '1' and a label of 'Level 3' and the second has an id of '2' and a label of 'Level 4'. If I select the second one of these options in the 'Security Level' drop down when doing a search, the URL contains '...&security=2&...'. Is there any way I could replace the '2' in the URL so that it reads '...&security=Level4&...' instead as this URL would be easier to understand in the website's page statistics?
Many thanks in advance for any assistance.
Kind regards
Paul