Hello! 🙂
I have this which is working fine:
$copy = copy($_FILES['uploadFile'. $x]['tmp_name'],$file_name);
Now I need to also specify the directory( $album which is a folder from 1-10 ( and $album is int 1-10)) where the file should be uploaded. (the folders are directly "under" this folder where this code is)
I am building on more on this little great script: http://www.devarticles.com/c/a/PHP/Creating-a-MultiFile-Upload-Script-in-PHP/
Any ideas please?
All code:
<?
$uploadNeed = $_POST['uploadNeed'];
// start for loop
for($x=0;$x<$uploadNeed;$x++){
$file_name = $_FILES['uploadFile'. $x]['name'];
// strip file_name of slashes
$file_name = stripslashes($file_name);
$file_name = str_replace("'","",$file_name);
$copy = copy($_FILES['uploadFile'. $x]['tmp_name'],$file_name);
// check if successfully copied
if($copy){
echo "$file_name | File uploaded!<br>";
}else{
echo "$file_name | Problems! File not uploaded <br>";
}
} // end of loop
?>