title: Php image validation
body: <p>Thus anyone has any idea why this code is not working for me </p>
  
  <pre><code>$type1 = $_FILES['textfield2']['type'];
  $type2 = $_FILES['textfield3']['type']; 
  
  if($type1 == 'image/gif' || $type1 == 'image/png' &amp;&amp; $type2 == 'image/gif' || $type2  == 'image/png')
  {
      echo 'Valid';
      echo $type1.'&lt;br /&gt;'.$type2;
  }
  else
  {
      echo 'Invalid';
  }
  </code></pre>
  
  <p>If i select 1st file as a zip or any other format and then next as png it is going to valid that what i should not</p>