Thanks for your reply Dennis. I have looked at the code and I think it will not be able to do what I am looking for. Your code appears to be making a new query from an option in a dropdown box, however I want to make an additional condition to the last query that populated the list page in order to subfilter further what is listed. I think my pictures below should help to describe this:
- When the list page initially loads all samples (factories) are in the list. I have populated a google map with the locations of these and have also provided a summary of the numbers of factories of each type (the lines next to the google map, above the list). See the linked picture for this. I would like these lines (for the facility numbers, e.g. Operational, In Construction etc.) to be hyperlinks that, when clicked, will filter out only that category. When there has been no previous query then this is easy since I can do an Field1, Value1 etc. href like you list in your code.

However....the user may use a search criterion or click another element on the list page and the list page reloads based on that filter, for example in this instance (picture below) the user has searched for all "hydrolysis" type facilities that are in the USA (using the search page). That provides the following url in the search bar on the list page.
http://localhost:8085/Commercial_and_Pilot_Facilities_list.php?a=integrated&simpleSrchFieldsComboOpt=&simpleSrchTypeComboNot=&simpleSrchTypeComboOpt=&criteria=and&type1=&value11=Hydrolysis&field1=process1&option1=Contains¬1=&type2=&value21=USA&field2=country_facility&option2=Contains¬2=
The list page then loads and you can see that the numbers for the facility types next to the map have changed, reflecting the results of this query.

I want the user to be able to click on the numbers for these type (e.g. Operational (2)) and the previous query will be further filtered to just list those two facilities. As far as I gather, under your code clicking on that line would open the list page again with a list of all of the Operational Demonstration Scale facilities rather than just the "Hydrolysis" ones in the USA. Now, if I knew the number of fields in the query I guess I could get the URL of the last query and add a search criterion to it but there may be a different number of search values in the last query (e.g. maybe the user just searched for the USA (1 field)or maybe he searched for hydrolysis facilities in the USA producing ethanol (3 fields).
I really hope you can help with this! Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=67709&image=3&table=forumreplies' class='bbc_emoticon' alt=':)' />
Hi!
There are many ways to do that.
The easiest way to use the simple or advanced search panel where you can select the
necessary values from fields.
Or you can create a php snipplets with a dropdown list box which is refresh automatically the page:
//create dropdown box
$str = "";
$str.= "<select onchange=\"window.location.href=this.options[this.
selectedIndex].value;\"><option value=\"\">Please select</option>";
//select values from database
global $conn;
$strSQL = "select company from tablename";
$rs = db_query($strSQL,$conn);
while ($data = db_fetch_array($rs))
$str.="<option value=\"tablename_list.php?ctlSearchFor=".$data["company"].
"&srchOptShowStatus=1&ctrlTypeComboStatus=0&srchWinShowStatus=0&a=
integrated&id=1&criteria=and&type1=&value11=".$data["company"].
"&field1=company&option1=Contains¬1=a=search&value=1\">".
$data["company"]."</option>";
$str.="</select>";
echo $str;
BR:
Dennis