View Full Version : Search using 'and' 'or' submit buttons

07-02-2010, 01:45 PM

I have built a search form that returns the results on a 'results' page using multiple 'OR' statements for the criteria. I now want the same input form to return results using the AND statement.
On the serach criteria I have a submit button that calls the 'resultsOR' page, how do I add another button on the form to return 'resultsAND' page? I am sure it a simple solution but I just cant get my ead round it.

Thanks in anticipation

07-03-2010, 01:19 AM
dont see how you can. cant you change your search page to filter the $_POST results and use a switch?

07-05-2010, 08:58 AM
use a check-box to differentiate between AND / OR...

Build your SQL dynamically based on this selection