title: Warning: move_uploaded_file
body: <p>i m back again still learning for multiple upload. Ok i got a situation in here. And i got 2 warning :</p>
  <blockquote>
  <p>Warning: move_uploaded_file() expects parameter 1 to be string, array given in F:\wamp\www\dki\1\entry_fotos.php on line 32</p>
  <p>Warning: move_uploaded_file() expects parameter 1 to be string, array given in F:\wamp\www\dki\1\entry_fotos.php on line 45</p>
  </blockquote>
  <p>and  this is the code</p>
  <pre><code>   $ne_photo_images = $_FILES['ne_photo_image']['name'];
     $fe_photo_images = $_FILES['fe_photo_image']['name'];
     $tmp_file = $_FILES['ne_photo_image']['tmp_name'];
     $tmp_file1 = $_FILES['fe_photo_image']['tmp_name'];
  
        if(!is_array($ne_photo_images)) {
           $ne_photo_images = array();
  
      }
  
    if(!is_array($tmp_file)) {
          $tmp_file = array();
       }
         if(! move_uploaded_file($tmp_file, 'image/' . $ne_photo_images))
  
   if(!is_array($fe_photo_images)) {
          $fe_photo_images = array();
      }
   if(!is_array($tmp_file1)) {
          $tmp_file1 = array();
      }
      if(! move_uploaded_file($tmp_file1, 'image/' . $fe_photo_images))
  </code></pre>
  <p>and i got this query code from the my question feedback before</p>
  <pre><code>   $sql = &quot;INSERT INTO photo(`photo_id`, `ne_photo_image`, `fe_photo_image`, `hop_id`,    `title`) VALUES&quot;;
     for($i = 0, $l = sizeof($titles) ; $i &lt; $l ; $i++)
     {
        //adding row datas
        $sql .= &quot; (null, 
                   '&quot;.$ne_photo_images [$i].&quot;', 
                   '&quot;.$fe_photo_images [$i].&quot;', 
                   '&quot;.$hopid.&quot;', 
                   '&quot;.$titles[$i].&quot;')&quot;;
        if($i &lt; $l - 1)
           $sql .= &quot;,&quot;;
     }
  
     if(mysql_query($sql))
     {         
     }
  </code></pre>
  <p>and this is my form :</p>
  <pre><code>&lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
      &lt;table border=&quot;0&quot;cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width= &quot;100%&quot;&gt;
          &lt;tr&gt;
              &lt;td&gt;Hop Name :&lt;?echo &quot;$data[hop_name]&quot;?&gt;
                  &lt;input type='hidden' name='photo_hop_id' value='&lt;?echo&quot;$data[hop_id]&quot;?&gt;'&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
                  &lt;table border=&quot;0&quot;cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width= &quot;100%&quot;&gt;
      &lt;tr&gt;
                  &lt;td cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width= &quot;50%&quot;&gt; 
                      Near End Site Name : &lt;?echo &quot;$data[ne_site_name]&quot;?&gt;
                          &lt;/br&gt;
                      Near End Site Id : &lt;?echo &quot;$data[ne_site_code]&quot;?&gt;
                  &lt;/td&gt;
                  &lt;td cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width= &quot;50%&quot;&gt; 
                      Far End Site Name : &lt;?echo &quot;$data[fe_site_name]&quot;?&gt;
                          &lt;/br&gt;
                      Far End Site Id : &lt;?echo &quot;$data[fe_site_code]&quot;?&gt;
                  &lt;/td&gt;
      &lt;/tr&gt;   
      &lt;tr&gt;
                  &lt;td cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width= &quot;50%&quot;&gt; 
                      &lt;?  $pm1= mysql_query(&quot;SELECT photo_name FROM photo_name WHERE photo_name_id = 1&quot;);
                          $dpm1 = mysql_fetch_array ($pm1);echo&quot;$dpm1[0]&quot;?&gt; 
                      &lt;input type='hidden' name='photo_name_id[]' value='&lt;?echo&quot;$dpm1[0]&quot;?&gt;'&gt; :  
                      &lt;input type=&quot;file&quot; name=&quot;ne_photo_image[]&quot;&gt;
                  &lt;/td&gt;
                  &lt;td cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width= &quot;50%&quot;&gt; 
                      &lt;?echo &quot;$dpm1[0]&quot;?&gt; : &lt;input type=&quot;file&quot; name=&quot;fe_photo_image[]&quot;&gt;
                  &lt;/td&gt;
      &lt;/tr&gt;   
      
  &lt;/table&gt;
  
      &lt;/table&gt;
      &lt;input type=&quot;submit&quot; value=&quot;tambah&quot; /&gt;
  &lt;/form&gt;
  </code></pre>
  <p>and i hope this is easier to spot. Many thanks for the help</p>