php 2 file input fields
<p>I have got a form that has 2 file input fields in it but it only uploads one of the files (the first one "u_img") from the input field. bellow are the input fields</p>

<pre><code>&lt;input name="u_img" type="file" /&gt;
&lt;input name="u_upload" type="file" /&gt;
</code></pre>

<p>im using this php to upload it.</p>

<pre><code>$pic_upload_path = "/home/users/A006193/fgpostbus.nl/www.fgpostbus.nl/enquete/";

// foto 1
if (is_uploaded_file($_FILES['u_upload']['tmp_name']))
{
$pic_loc_1 = $pic_upload_path.md5(time()).'_'.$_FILES['u_upload']['name'];
$rel_pic_loc_1 = "enquete/";
    if (move_uploaded_file($_FILES['u_upload']['tmp_name'],$pic_loc_1))
    {
    //echo "Het bestand is verplaatst naar $pic_loc1!";
    }
$rel_pic_loc_1 .= "".md5(time()).'_'.$_FILES['u_upload']['name']."";
}

if (is_uploaded_file($_FILES['u_img']['tmp_name']))
{
$pic_loc_2 = $pic_upload_path.md5(time()).'_'.$_FILES['u_img']['name'];
$rel_pic_loc_2 = "enquete/";
    if (move_uploaded_file($_FILES['u_img']['tmp_name'],$pic_loc_2))
    {
    //echo "Het bestand is verplaatst naar $pic_loc2!";
    }
$rel_pic_loc_2 .= "".md5(time()).'_'.$_FILES['u_img']['name']."";
}
</code></pre>

<p>i been looking at this for ages and i cant see why it doesnt work.</p>

<p>added:</p>

<p>result from print_r($_FILES);</p>

<pre><code>Array
(
[u_img] =&gt; Array
    (
        [name] =&gt; natasha.jpg
        [type] =&gt; image/jpeg
        [tmp_name] =&gt; /tmp/phpXU56Pg
        [error] =&gt; 0
        [size] =&gt; 5414
    )

[u_upload] =&gt; Array
    (
        [name] =&gt; DSC_0003.jpg
        [type] =&gt; image/jpeg
        [tmp_name] =&gt; /tmp/phpb4vAZj
        [error] =&gt; 0
        [size] =&gt; 110476
    )

)
</code></pre>
