New to PHP so apologies up front if I am asking simple stuff....
I have successfully uploaded data from a simple form into a mySQL database. I now need to store the uploaded file 'mydocument.pdf' into a server directory http://www.xxxx.com/pdf_files/. This directory has write permissions set.
I use the following code:
if(move_uploaded_file($_FILES['name']['tmp_name'], $target_path))
{
echo "<BR> The file has been uploaded <BR>";
} else{
echo "<BR> There was an error uploading the file, please try again! <BR>";
}
//$name ------------- mydocument.pdf
//$tmp_name --------- /usr/var/tmp/phpLMyDFP
//target_path ------- http://www.xxxx.com/pdf_files/mydocument.pdf
The upload always fails, I get no error messages, so what am I doing wrong?
Any help very much appreciated.

