title: using or (||) in php if condition creates problem
body: <p>i have done something like this:</p>
  
  <pre><code>  &lt;form action="validate.php" method="get"&gt;
  Id :&lt;input type="text" name="pID"/&gt;&lt;br/&gt;&lt;br/&gt;
  Name :&lt;input type="text" name="pName"/&gt;&lt;br/&gt;&lt;br/&gt;
  Description :&lt;input type="text" name="pDesc"/&gt;&lt;br/&gt;&lt;br/&gt;
  Price :&lt;input type="text" name="pPrice"/&gt;&lt;br/&gt;&lt;br/&gt;
  &lt;input type="submit" name="pSub"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>my validate.php contains :</p>
  
  <pre><code>&lt;?php 
  
  if (!empty($_GET['pID']) || !empty($_GET['pName']) || !empty($_GET['pDesc']) || !empty($_GET['pPrice'])){
              if(is_numeric($_GET['pID']) || is_numeric($_GET['pPrice']))
              {
                  echo "&lt;/br&gt;Your ID :".$_GET["pID"]."&lt;/br&gt;";
                  echo "Name is :".$_GET["pName"]."&lt;/br&gt;";
                  echo "Description :".$_GET["pDesc"]."&lt;/br&gt;";
                  echo "and Price :".$_GET["pPrice"]."&lt;/br&gt;";
              }
              else{echo "Pls See That ID and Price are Numerical";}
  }else{
  echo "Fill up All The Values";
  }
  ?&gt;
  </code></pre>
  
  <p>is not working properly ,</p>
  
  <p>1st if conditions doesn't work properly 
  ie.  if i left blank "Name" input field message should have come saying 
  "Fill up All The Values "...... instead its showing the list of inputs</p>
  
  <p>is there any other way to validate form (PHP)</p>