I want to allow registered members to upload files to the file system

I have two mysql tables members for registered users and a table files to have a trace which member uploaded which file.

now, I only would like to allow the upload of PDF's to the file system.

Then, I want the users to be able to leave a comment about what they think about the uploaded file and maybe even give a rating.

But for that my question is: What would be the easiest way to display the PDF's on a website to be able to allow other users to add a comment ?

currently, the PDF's would just be stored in a folder on the file system. How to get them displayed in a web page??

for information, my files table has
file_id primary key auto_increment
username (same as the username in the members table)
Time
type (MIME)
Size
IP (of user)
notes (folder name)
other text fields about the file like subject which should be searchable with a tag related search

If I understand you correctly you want to be able to display a PDF on screen in a browser and have a user enter comments. The first part is easy, browsers display PDFs naturally so you just link to the PDF. To have the PDF and the ratings/comments section on screen at the same time link the PDF to an iFrame and have the comments below it (or above it). Then you can have both things on the one page and easily viewed by the user.

commented: thx, I'll give it a try +0

Hello, this is correct. I have just one more question. Do you know if it would be possible to automatically link the PDF to the iFrame when doing the upload of the PDF to the file system? Or can it only be done manually after the upload has been done?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.