After the user click submit button on a form for uploading a file, the file will be uploaded to a temporary directory in the server and will be destroyed later. PHP stores all the information about the file in $_FILES array, so make use of this array to process the uploaded file.
- $_FILES['uploadedfile']['name'] : name of the uploaded file.
- $_FILES['uploadedfile']['tmp_name']: contents the path to the temporary file (uploaded file) that resides in the temporary directory of the server.
Before the temporary uploaded file is deleted, be sure to take action for the file.