|
i need a simple upload script and can't seem to find one.. i've downloaded all kinds of them over the past few days and the only ones that seem to get close to working are the php ones... but, the instructions for installation must be missing some magical word, because none of them so far have worked...
This one gets me an error message that says something is wrong on line 9 ... any suggestions?
<?
$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 | uploaded sucessfully!<br>";
}else{
echo "$file_name | could not be uploaded!<br>";
}
} // end of loop
?>
Vivvy
|