Below is code that I have been using. I can get everything to work correctly except for what is in Red. I can edit directly where just a single file is uploaded, but when I do an array, it won't work.
$foldername = "". $_REQUEST['ID'] ."";
if(!is_dir("photos/$foldername"))
{mkdir ("photos/$foldername", 0777);
chmod ("photos/$foldername", 0777);}
else {}
$resourcefolder = "photos/";
$filestocopy = "array";
$filestocopy[0] = "file1.php";
$filestocopy[1] = "file2.php";
$link = mysql_connect("localhost", "username", "password") or die("Could not connect to server!");
$sql=mysql_query("INSERT INTO folders ('" . $foldername . "') VALUES ('" . $foldername . "')");
[COLOR=Red]$frompath = "photos/";
$topath = "photos/$foldername/";
if(copy($frompath, $topath))[/COLOR]