Have a form and put an file input in it:
<form name="my_form" method="post" enctype="multipart/form-data" action="my_php_script.php">
<input type="file" name="my_file" />
</form>
Then in my_php_script.php, handle the file upload just like any other POST request. See this page for details on the backend: http://www.tizag.com/phpT/fileupload.php
The $_FILES array holds data pertaining to the uploaded file.
$_FILES['uploadedfile']['name'] - the original path of the user uploaded file.
$_FILES['uploadedfile']['tmp_name'] - the path to the temporary file that resides on the server. The file should exist on the server in a temporary directory with a temporary name.
You should move the file from the temporary directory to more permanent storage (like an uploads/ folder). You can do this using the move_uploaded_file() function like so:
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $uploads_folder);