hi
i've created a basic upload function where user can upload documents to 'upload' folder .
the problem now is
1) how to display the list of documents uploaded in the 'upload' folder and
2) to link the list to the documents so user be able to open that document(or download it).
this is the form.php used to upload :
<form action="upload.php" method="post" ENCTYPE="multipart/form-data">
<p>File:
<input type="file" name="file" size="30">
<input type="submit" value="Upload!">
</p>
<p> </p>
</form>
this is the upload.php used to upload :
<?php
// ==============
// Configuration
// ==============
$uploaddir = "uploads"; // Where you want the files to upload to - Important: Make sure this folders permissions is 0777!
// ==============
// Upload Part
// ==============
if(is_uploaded_file($FILES['file']['tmp_name']))
{
move_uploaded_file($FILES['file']['tmp_name'],$uploaddir.'/'.$_FILES['file']['name']);
}
print "Your file has been uploaded successfully! Yay!";
?>
I hope you guys could help
fyi i am using dmx /php/mysql
thanks