title: PHP - Only run a search if a dropdown value is chosen
body: <p>I have a search on a site which I only want to display any results if something has been entered into one of the fields. I'm not really a php person so the best I could do was by adding this before the search:</p>
  
  <pre><code>&lt;?php code on how to get the listings ... 
  
  if ($search_location != "" || $search_keywords != ""  ) {
  
  ... code on how to display the listings.} ?&gt;
  </code></pre>
  
  <p>As far as I understand this will only display the results if either the location or keywords are not empty. Works well so far.</p>
  
  <p>My problem: there is also a dropdown to select a category ... I tried adding this like:</p>
  
  <pre><code>if ($search_location != "" || $search_keywords != "" || $search_categories != ""  ) {
  </code></pre>
  
  <p>But the search doesn't work if you only choose a category you have to enter in one of the other fields also, so I am assuming this was wrong.</p>