I'm working on a project where the client wants to upload files to the server for his clients to download...
This is no problem, although I'm thinking about database structure and so forth, what would be a good way to have permissions so that when a user logs in, they can only see the files that have been set access to them?

I'm talking datatypes, what should/could be used and why?

Thanks.

    I would keep the files (regardless of what they are) as regular files in a folder below the htdocs level. Then store the paths to them in the database. When you want the user to download the files, user header() to force a download.

      how would this work with multiple files though?

        Not sure what you mean. It would work the same for one, as it would for many.

          have a files table that stores the information about files
          have a users table that stores information about the users
          have a users to files table that says what users can access what files.

            Write a Reply...