title: Input check isset or !empty not working either
body: <p>I am trying to get data from input values, when all input values are empty, except price. It echos nothing. I've done also method if all values are empty it echos all products. It works fine.</p>
  <p>First i decode JSON file and check all products. When the price are under limit i gave to input value, it push those products to new array. After looping and new array i encode it back to JSON. This loop is working fine, i tried it with link. Now I am doing that index.php where you can give custom limits. It does not work.</p>
  <p>Where is the problem? It somehow thinks all values are empty because it echo all products..</p>
  <p>I've tried <code>!empty</code> also but not working either.</p>
  <p>php code file</p>
  <pre><code>
  &lt;?php
  $nimi = $_POST[&quot;nimi&quot;];
  
  $kategoria = $_POST[&quot;kategoria&quot;];
  
  $paino = $_POST[&quot;paino&quot;];
  
  $tuoteid = $_POST[&quot;tuoteid&quot;];
  
  $hinta = $_POST[&quot;hinta&quot;];
  
  
  $tavarat_json = file_get_contents('tuotteet.json');
  $tavarat_array = json_decode($tavarat_json); // To Array
  
  // If all inputs are empty, echo all products -&gt; WORKS FINE
  if( empty($_GET[$hinta]) and empty($_GET[$kategoria]) and empty($_GET[$paino]) and empty($_GET[$tuoteid]) and empty($_GET[$nimi]) ) {
     header(&quot;Content-Type: application/json; charset=UTF-8&quot;); // Browser understand this is JSON and parse it nicely
  
   echo $tavarat_json;
  }
  
  // If all inputs are empty except price
  
  if( isset($_GET[$hinta]) and empty($_GET[$kategoria]) and empty($_GET[$paino]) and empty($_GET[$tuoteid]) and empty($_GET[$nimi]) ) {
      header(&quot;Content-Type: application/json; charset=UTF-8&quot;); // Browser understand this is JSON and parse it nicely
  
      $uudet_tuotteet = array();
    
        
      foreach ($tavarat_array as $tavara) {
        if ($tavara-&gt;hinta &lt; ($_GET[$hinta]) ) { // Where hinta is lower than gave in input
          array_push($uudet_tuotteet, $tavara); // Push to empty array
        }
      }
      if(count($uudet_tuotteet) == 0) { // If amount of product is zero, echo &quot;No products&quot;
        echo json_encode(&quot;Tuotetta ei löydy&quot;); // To JSON
      }
      else {
        $uudet_tuotteet_json = json_encode($uudet_tuotteet); // To JSON
        echo $uudet_tuotteet_json;
      }
  }
  
  
  ?&gt;
  
  </code></pre>
  <p>My index page also if there is something you want to see:</p>
  <pre><code>
  &lt;!DOCTYPE HTML&gt;
  &lt;html&gt; 
  &lt;head&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css&quot; integrity=&quot;sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh&quot; crossorigin=&quot;anonymous&quot;&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div class=&quot;d-flex justify-content-center&quot; style=&quot;margin-bottom: 50px;&quot;&gt;
      &lt;h1 style=&quot;text-align:center;&quot;&gt;PHP-ohjelmointi&lt;br&gt;Loppuharjoitus&lt;/h1&gt;
  &lt;/div&gt;
  
  &lt;div class=&quot;d-flex justify-content-center&quot;&gt;
      &lt;div id=&quot;formi&quot; style=&quot;width: 500px;&quot; &gt;
          &lt;form action=&quot;rajapinta.php&quot; method=&quot;post&quot;&gt;
  
          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; aria-label=&quot;Small&quot; aria-describedby=&quot;inputGroup-sizing-sm&quot; name=&quot;nimi&quot; v-model=&quot;name&quot; placeholder=&quot;Tuotteen nimi&quot;&gt;
          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; aria-label=&quot;Small&quot; aria-describedby=&quot;inputGroup-sizing-sm&quot; name=&quot;kategoria&quot; v-model=&quot;name&quot; placeholder=&quot;Tuotteen kategoria&quot;&gt;
  
          &lt;input type=&quot;number&quot; class=&quot;form-control&quot; aria-label=&quot;Small&quot; aria-describedby=&quot;inputGroup-sizing-sm&quot; name=&quot;tuoteid&quot; v-model=&quot;name&quot; placeholder=&quot;Tuoteid&quot;&gt;
          &lt;input type=&quot;number&quot; class=&quot;form-control&quot; aria-label=&quot;Small&quot; aria-describedby=&quot;inputGroup-sizing-sm&quot; name=&quot;hinta&quot; v-model=&quot;name&quot; placeholder=&quot;Hinta alle (€)&quot;&gt;
          &lt;input type=&quot;number&quot; class=&quot;form-control&quot; aria-label=&quot;Small&quot; aria-describedby=&quot;inputGroup-sizing-sm&quot; name=&quot;paino&quot; v-model=&quot;name&quot; placeholder=&quot;Paino alle (kg)&quot;&gt;
  
          &lt;input style=&quot;margin-top: 20px;&quot; type=&quot;submit&quot; value=&quot;Lähetä&quot;&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  </code></pre>