it is related to the question which i posted b4
my case is
i have a form, it allows user to upload files
once the user browse and select the file and Click OK(not submitting form, just execute some JS to pass the filename, etc to ListBox)
the filename and someother information will pass to a ListBox
and now i want to submit the whole form and perform upload and store infor. to DB.
my problem is in upload
since the filename is in listbox not in <input type=file....>
so i use
copy($completepath, "upload/$fname");
and the $completepath = "C:\file.ext";
intead of
copy($_FILES['userfile1']['tmp_name'], "upload/fname");
but PHP return me
Unable to open 'c:\my documents\test.ra' for reading: No such file or directory
what should i do?
is the copy function only copy file from <input type=file..> tag?