1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

PHP Problem: How can i personalize the uploaded files by users on my website?



I have a website that users with login information can upload their files. I want only the user who uploaded the file can have access to that file. I’m using PHP.


3 Responses to “PHP Problem: How can i personalize the uploaded files by users on my website?”

  • irishtek says:

    track in a database what user uploaded what file.

    when you display the list of files to the user only show the files based on the records in the database that are associated to the user.

    (Report comment)

  • 3fay.com says:

    just follow the steps:

    1) collect the file name,file type and file full path(uploaded path) and all necessary details to database table with member ID

    2)Organize the uploaded files in uploads directory with corresponding member ID ( Ex: uploads/12). if you want to more specific try it as
    uploads/12/purpose1/ , uploads/12/purpose2/ etc..

    3) do not forget to make configuration variables like where to store(absolute path and http path) ,upload directory etc..

    (Report comment)

  • ? says:

    Here is possibility to do it:

    1. Create a field on the uploaded file table, that you can name it UserId
    2. Insert the UserId when the user it’s uploading the file.
    3.Make a query on page you wanna show the uploaded files, to show only the files that have UserId with the one that is for the user logged.

    (Report comment)

Leave a Reply

Spam Protection by WP-SpamFree

Netflix, Inc.

TigerDirect