title: How to Execute second MySQL CONDITION if first one fails (PHP/MySQLi)
body: <p>I need help. I know that I can use "if...elseif" in PHP but the problem is the current condition is already inside a long "elseif" so I don't want it to be nested by creating another "if..." inside it.</p>
  
  <p>I have my search form (please see image below) and my mysqli statement that works fine for one side only (Price to).
  I want to be able to : when a user select a "category" like "Coach", and enter one of the price (from &amp; to), the search must work normally as expected. 
  if the user only enter "price from", the statement work from the inputted amount, and if he enters "price to" the statement also work to the inputted amount.</p>
  
  <p>I tried to use many operators (OR / AND...) but still not achieving what I want.</p>
  
  <pre><code>elseif ($category=="coach"){
  echo "3 !!!!!!!" ."&lt;br&gt;";
  $result = $connection-&gt;query("select * 
                              from tblcoach 
                              where price&gt;='$pricefrom' 
                              and price&lt;='$priceto'");
  }
  </code></pre>
  
  <p>Below is my sql statement that only work when I 
  and I want to </p>
  
  <p><img src="https://i.stack.imgur.com/pOkdx.png" alt="image of web form"></p>