Hi, if I have few files (xlsx) in a folder on my computer (file's name is known), and I want to give the path of the folder in my form using a textbox,

<input type="text" name="path" id="path" >

and for the files to be uploaded to a specific folder on the server so I can use them with php, how can I do that?
I know how to upload files with <input type="file"..>
this is my code for uploading a single file like that:

if ($_FILES['docfile1']['name']!='') {
	$target = 'importFiles/';    
	$target = $target . basename($_FILES['docfile1']['name']);
	if ($target =="import/myfile.xlsx"){
		if (file_exists($target))
		if (move_uploaded_file($_FILES['docfile1']['tmp_name'], $target))   {			echo 'success';
			echo 'fail';  		
	         echo 'fail';

I'm trying to change this code so that I can use the path of the folder instead of the input file, but how can I get the $_FILES? I can't figure it out..

6 Years
Discussion Span
Last Post by niranga
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.