title: Php validation on multiple numeric fields for multiple checks
body: <p>I am trying to validate multiple numeric fields for multiple checks ie. There are 6 numeric field and I want to run 6 checks.</p>
  <ol>
  <li>Firstly, total less than 0 and more then 60 give expected results, but</li>
  <li>Failing checks and not behaving as expected for the checks below:
  a. Integer
  b. Numeric
  c. Negative
  d. Not Float</li>
  </ol>
  <pre><code>  $seatsSTA = $_POST['seats']['STA'];
    $seatsSTP = $_POST['seats']['STP'];
    $seatsSTC = $_POST['seats']['STC'];
    $seatsFCA = $_POST['seats']['FCA'];
    $seatsFCP = $_POST['seats']['FCP'];
    $seatsFCC = $_POST['seats']['FCC'];
    $minSeats = 1; $maxSeats = 60;
    $totalSeats= ((int)$seatsSTA + (int)$seatsSTP + (int)$seatsSTC + (int)$seatsSTP + (int)$seatsFCA + (int)$seatsFCP + (int)$seatsFCC );
  
    if ( $totalSeats &lt; $minSeats ) {
      $errorsBook['user']['seats'] = &quot;Atleast one session must be selected. &quot;; 
      // header(&quot;Location: index.php&quot;); 
    }  elseif ( $totalSeats &gt; $maxSeats ) {
        $errorsBook['user']['seats'] = &quot;Too many seats selected. &quot;; 
        // header(&quot;Location: index.php&quot;); 
    } elseif ( !is_int($seatsSTA || $seatsSTP || $seatsSTC || $seatsFCA || $seatsFCP || $seatsFCC) ){
      // $errorsBook['user']['seats'] = &quot;Please correct seat selection. &quot;;
      header(&quot;Location: index.php&quot;); 
    }
      elseif ( !is_numeric($seatsSTA || $seatsSTP || $seatsSTC || $seatsFCA || $seatsFCP || $seatsFCC) ){
        // $errorsBook['user']['seats'] = &quot;NOT numeric character. &quot;;
        header(&quot;Location: index.php&quot;); 
      }
      elseif (($seatsSTA || $seatsSTP || $seatsSTC || $seatsFCA || $seatsFCP || $seatsFCC) &lt; 0 ){
        // $errorsBook['user']['seats'] = &quot;Negative number not allowed. &quot;;
        header(&quot;Location: index.php&quot;); 
      } 
      elseif ( is_float($seatsSTA || $seatsSTP || $seatsSTC || $seatsFCA || $seatsFCP || $seatsFCC) ){
        // $errorsBook['user']['seats'] = &quot;Please correct seat selection. &quot;;
        header(&quot;Location: index.php&quot;); 
  
    }
  
    return $errorsBook;
  }
  </code></pre>