Search Engine Results - Multiple of same criteria - OR

2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 25, 2008   (RSS)

By rjbathgate - June 24, 2008

Hi... again...!

I have a search engine which contains a select box whereby users can select one, or multiple options in the select box:

<select name="property_type" multiple="multiple" size="3">
<option value="">Any</option>
<option value="Apartment">Apartment</option>
<option value="Building Plot">Building Plot</option>
<option value="Bungalow">Bungalow</option>
<option value="Land">Land</option>
<option value="House">House</option>
</select>


When submitting, the results only display those meeting the criteria of the LAST selected option in the above <select>.

Say for example we've selected Land and House on the <select> we only get results as per:

results.php?page=1property_type=House

How can I ensure the results page brings over all selected criteria and applies OR to the results?

I've also got page listing links (eg 1,2,3,4,5 etc) which would also need to also contain all the criteria with OR rules - link at the moment is coded as:
<a href="results.php?page=<?php echo $page; ?>&property_type=<?php echo @$FORM['property_type']; ?><?php echo $page; ?></a>

Many thanks again Dave,
Rob