Jump to content

how to allow only certain users to download uploaded file


swapnilyeole

Recommended Posts

I have a page in which i upload a circular & also select users who can view this page using multiple select dropdown box.

 

Now how to display the uploaded file to selected users when they login and not to other users.

 

Can anybody help.

Thanks in advance.

 

One way:

 

 

1) Each new 'circular' has an ID and ref. and server location if is a file in a mysql table

 

2) Create another table (basic example)

id      |  circularID

7134  |  873

5183  |  873

7132  |  873

7239  |  873

 

3) Add a new plugin to any page required which will check if the userID of the user accessing said page is in the table created in step 2..... then allow them to view or download the file.

(also place the files out of the public www so no-one can publicly get to it, meaning php will have to pull the file, process and print to user)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.