title: PHP error using variables
body: <p>This is my code:</p>
  
  <pre><code>    $amountError = '';
      $amountMin = 0.50; // Minimum amount
      $amountMax = 100; // Maximum amount
  
  if ($_SERVER['REQUEST_METHOD'] == 'POST') {
      if (empty($_POST['amount'])) {
          $amountError = 'Empty amount';
      }
      if (!filter_var($_POST['amount'], FILTER_VALIDATE_FLOAT,
      array("options" =&gt; array(
      "min_range"=&gt;$amountMin,
      "max_range"=&gt;$amountMax))) === false) {
          header('Location: apmoketi.php');
          exit; // Should I use it?
      } else {
          $amountError = 'Incorrect amount';
      }
  }
  </code></pre>
  
  <p>The problem is, if the amount is empty, I'm getting 'Incorrect amount', but not 'Empty amount' error. And if the amount is filled in but not between <code>$amountMin</code> and <code>$amountMax</code> then I got redirected to 'apmoketi.php' page, but don't get the 'Incorrect amount' error. 
  How do I fix that?</p>