title: PHP - Multiple image Upload, how to allow more than one format?
body: <p>I found a free picture upload script on the webby, but it only allows JPG/JPEG formats.</p>
  
  <p>How do I allow it to upload format PNG and BMP?</p>
  
  <pre><code>for($i=0;$i&lt;count($_FILES["fileUpload"]["name"]);$i++)  
  {  
      if(trim($_FILES["fileUpload"]["tmp_name"][$i]) != "")  
      {  
          $images = $_FILES["fileUpload"]["tmp_name"][$i];  
          $new_images = "thumbnails_".$_FILES["fileUpload"]["name"][$i];  
          copy($_FILES["fileUpload"]["tmp_name"][$i],"PIC_FOLDER".$_FILES["fileUpload"]["name"][$i]);  
          $width=100; //*** Fix Width &amp; Heigh (Autu caculate) ***//  
          $size = GetimageSize($images);  
          $height = round($width*$size[1]/$size[0]);  
          $images_orig = ImageCreateFromJPEG($images);  
          $photoX = ImagesX($images_orig);  
          $photoY = ImagesY($images_orig);  
          $images_fin = ImageCreateTrueColor($width, $height);  
          ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);  
          ImageJPEG($images_fin,"PIC_FOLDER".$new_images);  
          ImageDestroy($images_orig);  
          ImageDestroy($images_fin);  
  
          echo "Resize Successful.&lt;br&gt;";
      }  
  }  
  </code></pre>
  
  <p>Thanks in advance</p>