Undefined index error
<p>I have a PHP uploader script which handle multiple uploads. The script works well but I get this error below:</p>

<pre><code>Notice: Undefined index: uploadedFile in C:\wamp\www\setapro\rmc_manager.php on line 52
</code></pre>

<p>The above error occurs on this line below:</p>

<pre><code>$inFilesArray = ($_FILES['uploadedFile']['name']);
</code></pre>

<p>I have tried to do something like:</p>

<pre><code>if (!isset($_FILES['uploadedFile']['name'])){
$_FILES['uploadedFile']['name'] = '';
}
</code></pre>

<p>but it does not work. I wish to do something about the notice. Any suggestions would be appreciated. Thanks</p>

<p>Edit: Part of my html</p>

<pre><code>form action="rmc_manager.php" method="post" enctype="multipart/form-data"&gt;&lt;input    type="hidden" name="MAX_FILE_SIZE" value="3000000" /&gt;

Please choose files to upload:&lt;br /&gt;
&lt;input name="uploadedFile[]" type="file" class="txt" /&gt;&lt;br /&gt; 
&lt;input name="uploadedFile[]" type="file" class="txt" /&gt;&lt;br /&gt;
&lt;input type="submit" name="uploadfiles" value="Upload files" class="btn" /&gt;
</code></pre>

<p>PHP Upload manager:</p>

<pre><code>if (isset($_POST['uploadfiles'])) {
$number_of_uploaded_files = 0;
$number_of_moved_files = 0;
$uploaded_files = array();
$upload_directory = dirname(__file__) . '/Uploads/';
for ($i = 0; $i &lt; count($_FILES['uploadedFile']['name']); $i++) {
    if ($_FILES['uploadedFile']['name'][$i] != '') { //check if file field empty or not
        $number_of_uploaded_files++;
        $uploaded_files[] = $_FILES['uploadedFile']['name'][$i];
        //if (is_uploaded_file($_FILES['uploadedFile']['name'])){
        if (move_uploaded_file($_FILES['uploadedFile']['tmp_name'][$i], $upload_directory . $_FILES['uploadedFile']['name'][$i])) {
            $number_of_moved_files++;
        }

    }

}

}
echo "Number of files submitted $number_of_uploaded_files . &lt;br/&gt;";
echo "Number of successfully moved files $number_of_moved_files . &lt;br/&gt;";
echo "File Names are &lt;br/&gt;" . implode("&lt;br/&gt;", $uploaded_files);
echo "&lt;br&gt;&lt;/br&gt;";
echo "&lt;p&gt; Please find the processed GGAs with dates in the Setapro project folder&lt;/p&gt;";
</code></pre>
