well do you want the uploaded files to be displayed dynamicaly, i.e when new files are uploaded into this directory, you display the new files. If so you need three files, two php and one html.
This is the code for the uploading part
<?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 = 'files/';
$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>";
?>
This is for the upload form
<html>
<head>
<title>Test Upload </title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
// the value I think is in bytes, but not sure
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
</body>
</html>
and if you want to do the displaying dynamically look for a function called opendir on
www.php.net
Hope this helps