When a file is uploaded to the server, it will be temporarily stored in a PHP temp folder on the server. This temporary file disappears when the script ends. To store the uploaded file we need to copy it to a different location. The name of this temporary copy is : $_FILES['photo']['tmp_name']
Hope the following will helps.
move_uploaded_file($_FILES['photo']['tmp_name'], './images/'.$new_file_name);