PHP MULTIPLE UPLOADING
<p>i need your help, i want to upload multiple images , i want to upload image in many as i want but its seems my code doesnt working at all. so would you please help me for my code.</p>

<p>this is my HTML FORM. i just did multiple attribute but it seems not working, i dont where i will put the bracket thing. im confused with the logic</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;form name="Image" enctype="multipart/form-data" action="upload.php" method="POST"&gt;
        &lt;h1&gt;&lt;font face="tahoma"&gt; UPLOAD FILES&lt;/h1&gt;
        &lt;label for="file"&gt;Filename:&lt;/label&gt;
        &lt;input type="file" name="Photo[]"  accept="image/*" multiple="multiple"/&gt;&lt;br/&gt;&lt;br/&gt;
        &lt;input type="hidden" id="pageName" name="pageName"&gt;
            &lt;script type="text/javascript"&gt;
                //get page name from parent
                var value = window.opener.pageName
                document.getElementById("pageName").value = value;
            &lt;/script&gt;

        &lt;INPUT type="submit" class="button" name="Submit" value=" Upload "&gt;
        &lt;INPUT type="reset" class="button" value="Cancel"&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;/form&gt;
&lt;/head&gt;
&lt;/html&gt;


//this is my script, i cant get the logic so please he for my code , i will very thankful to you guyz if you see the solution. i cant get the logic in the array , the always error is this: "Warning: move_uploaded_file() expects exactly 2 parameters, 1 given in C:\wamp\www\updatedTHESIS\updatedILAMadmin\upload.php on line 75". 

//
&lt;?

if(isset($_REQUEST['pageName']))
    $pageName = $_REQUEST['pageName'];
else
    $pageName = "";

include('global.php');
?&gt;

&lt;?

$uploadDir = 'directory/'; //Image Upload Folder

if(isset($_POST['Submit']))
    {


    $fileName = $_FILES['Photo']['name'][0];
     $fileName1 = $_FILES['Photo']['name'][1];
    $tmpName = $_FILES['Photo']['tmp_name'];
    $fileSize = $_FILES['Photo']['size'];
    $fileType = $_FILES['Photo']['type'];

    $filePath = $tmpName;

    //upload error

    if ($_FILES["Photo"]["error"][0] &amp;&amp; ($_FILES["Photo"]["error"][1]) &gt;0)
  { 
  echo "Error: " . $_FILES["Photo"]["error"][0] . "&lt;br /&gt;";
  echo "Error: " . $_FILES["Photo"]["error"][1] . "&lt;br /&gt;";
  }


  //photo already exixts







else    
//insert image into DB
{


  move_uploaded_file($filePath);



   $query = "INSERT INTO images (image , category ) VALUES ('$filePath', '$pageName')";
    mysql_query($query) or die('Error, query failed');
    echo" Upload Successful. &lt;br/&gt; &lt;br/&gt;";
            echo "Stored in: " . "directory/" . $_FILES["Photo"]["name"][0];
            echo "Stored in: " . "directory/" . $_FILES["Photo"]["name"][1];
?&gt;
  &lt;br/&gt;&lt;br/&gt;
                    &lt;img width="300" height="400" src="directory /&lt;?=$_FILES["Photo"]["name"][0]?&gt;"&gt;&lt;br/&gt;
                    &lt;img width="300" height="400" src="directory /&lt;?=$_FILES["Photo"]["name"][1]?&gt;"&gt;&lt;br/&gt;
&lt;?
}
}
?&gt;
</code></pre>
