Im in the process of writing a script which will upload many files. So far i have created a bit that will give me how many forms i need to upload however many files i need, but it doesnt upload them, or move them to another directory...

I have looked through the forums and all the upload thingds only relate to doing one file...

here my scripty!

PHP Code:
if($page=="4") {
    ?>
    <html><head><title>New Picture Section - Part 2</title></head>
    <body bgcolor="#CCCCCC">
    <font face="verdana" size="5">Add new Pictures to <?=$secname?><font size="2"><BR><BR>Upload Pictures and Info. This page will problalbly take you a long time, so i would get something downloading while your not using the net (as such :D). There is no reset button on here because if you hit it accidentally, you would be totally devistated :D:D<BR><BR>

    <?PHP

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

    while(
$y>1) {

        print 
"this code is running<BR>";

        
$noofpic $number;
        
$big "big";
        
$small "small";

      
$fileUploadCopy $_FILES['$y$small']['tmp_name'];
      
$fileUpload $_FILES['$y$small']['name'];
      
$fileUploadCopy2 $_FILES['$y$big']['tmp_name'];
      
$fileUpload2 $_FILES['$y$big']['name'];

      
$imageName $fileUpload;
      
$imageName2 $fileUpload2;

        
$y--;

      if (
$fileUploadCopy != "none") {
        
copy($fileUploadCopy,"uploads/$imageName");
    }
      if (
$fileUploadCopy2 != "none") {
        
copy($fileUploadCopy2,"uploads/$imageName");
    }
      }
      }

    if(!
$thumbnails==NULL && !$textforeach==NULL) {

        
$noofpic $number;
        
$y 0;
        
$big "big";
        
$small "small";

        
#print "<table>";
        
print "<form method=\"post\" enctype=\"multipart/form-data\">";
        
#print "<input type=\"hidden\" name=\"page\" value=\"5\">";

        
while($y $noofpic) {
            
$s $y 1;
            print 
"<table><TR><TD>Picture no.</td><td>$s</td></tr><tr><td>Thumbnail</td><td><input type=\"file\" name=\"$y\"></td></tr><tr><td>Big Picture</td><td><input type=\"file\" name=\"$y$small\"></td></tr><tr><td>Text</td><td><input type=\"text\" name=\"$y$big\"></td></tr></table><BR>";
            
$y++;
        }

        print 
"<input type=\"submit\" name=\"submit\" value=\"Upload\">";
        print 
"</form>";

    }

else print 
"There has been an error while executing this script. Please retry, or send an email to the <a href=\"mailto:$webmasteremail?subject=Error with picture page\">webmaster</a>";
}
?>
as you can see i have used while loops and stuff, and tryed to double the amount of stuff you can upload, any help is appreciated, thanks