Receive the file on server using the function
$_FILES['fieldname']
If provides different sub fields to get more information about the file being uploaded
$_FILES['fieldname']['type']' -- returns file type
$_FILES['fieldname']['name'] -- returns the name of the file
$_FILES['fieldname']['temp_name'] -- returns temporary file name of current file
$_FILES['fieldname']['size'] -- returns size of the file in bytes
$_FILES['fieldname']['error'] -- returns error code
$_FILES['fieldname']
If provides different sub fields to get more information about the file being uploaded
$_FILES['fieldname']['type']' -- returns file type
$_FILES['fieldname']['name'] -- returns the name of the file
$_FILES['fieldname']['temp_name'] -- returns temporary file name of current file
$_FILES['fieldname']['size'] -- returns size of the file in bytes
$_FILES['fieldname']['error'] -- returns error code
Check whether a file exists or not
file_exists('filename with path') -- returns true if file exists
Now upload the file in the folder where you want
move_uploaded_file('temporaryname','actual filename with path')
-- to move the file into specified folder from temporary folder