File from post
<?php
echo "Upload: " . $_FILES["foto"]["name"] . "<br />";
echo "Type: " . $_FILES["foto"]["type"] . "<br />";
echo "Size: " . ($_FILES["foto"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["foto"]["tmp_name"];
if (move_uploaded_file($_FILES['foto']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}