I'm attempting to copy one file from one folder to another in a while statement, but I seem to be getting a permissions error. The seperate folders are being created based upon the number of entries from the db, but what I'm trying to do is then afterwards copy the $rowp[zipfile] into the $rowp[path] folder name per each result entry of the while statement. :bemused:
while ($rowp=mysql_fetch_array($res)){
$productfolder = "zips/$rowp[path]";
mkdir($productfolder, 0700);
copy("zips/vault/$rowp[zipfile]/", "zips/$rowp[path]/");
echo "$rowp[name] - <a href=zips/$rowp[path]/$rowp[zipfile]>Download Now!</a><br>";
}