title: How to move two pictures to a folder? PHP
body: <p>I've got this code and I need copy the two images 'original' and 'tmp_image' in folder images/app.</p>
  
  <p>How i can move this pictures? :</p>
  
  <p>I've tried this but only moves picture 'original':</p>
  
  <p><strong>move_uploaded_file("images/app/".$_FILES["imagen"]["tmp_name"],"images/app/".$_FILES["imagen"]["name"]);</strong></p>
  
  <pre><code> function resize($target,$new,$w,$h,$type){
     list($wo,$ho)=getimagesize($target);
      if($type=="image/jpeg"){
       $nen = imagecreatefromjpeg($target);
      }elseif($type=="image/gif"){
       $nen = imagecreatefromgif($target);
      }elseif($type=="image/png"){
       $nen = imagecreatefrompng($target);
      }
        $chen = imagecreatetruecolor($w,$h);
        imagecopyresampled($chen,$nen,0,0,0,0,$w,$h,$wo,$ho);
        imagejpeg($chen,$new,80);
                                           }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>move_uploaded_file($_FILES["imagen"]["tmp_name"],$_FILES["imagen"]["name"]);
      $meter = "http://server/prueba/images/app/" . $_FILES["imagen"]["name"];
      $target = $_FILES["imagen"]["name"];
      $ssql = "insert into ofertas (imagen) values ('" . $meter . "')";
              $new = "resize_".$target;
              $type = $_FILES['imagen']['type'];
              $w = 80;
              $h = 80;
              resize($target,$new,$w,$h,$type);
  </code></pre>
  
  <p>Thanks all!!</p>