I Need Help! PHP Upload File form and I need the file to show up as a file path...

Phil M

New member
...in the database and not TEMP? I am constructing a PHP file upload code. The code I have works, but I need the path to show up in the MySQL database instead the "TEMP" temporary file path.

NOTE: i left the echos blank on purpose and the "/" in the code is their on purpose too.

Here is the code:

$target_path = "clientbackupfiles/";

$target_path = $target_path . basename( $_FILES['uploadedfile']/['name']);

if(move_uploaded_file($_FILES['uploadedfile']/['tmp_name'], $target_path)) {
echo "";
} else{
echo "";
}
 
Back
Top