You can do this pretty painlessly in PHP as well. Here's some sample code.
First, the form:
[php]
<html>
<form enctype="multipart/form-data" action="upload_action.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
Send this file: <input name="userfile" type="file"> (50KB maximum)
<input type="submit" value="Send File">
</form>
</html>
[/php]
Second, the script that processes the form:
[php]
<?php
// In PHP earlier then 4.1.0, $HTTP_POST_FILES should be used instead of
// $_FILES._ In PHP earlier then 4.0.3, use copy() and is_uploaded_file()
// instead of move_uploaded_file
$uploaddir = '/Library/WebServer/Documents/uploads/';
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info

n";
print_r($_FILES);
} else {
print "Possible file upload attack!_ Here's some debugging info

n";
print_r($_FILES);
}
print "</pre>";
?>
[/php]