jdowen2211 Posted July 26, 2011 Share Posted July 26, 2011 I am building a social network with PHP and MySQL and I want my members to be able to upload most kinds of files to the server then be able to download them at a later date. I want the files to be only visible to that user when they are logged in. I haven't a clue of how to do this and need help from you guys. Maybe a script or some tips, I will be grateful for anything. Quote Link to comment Share on other sites More sharing options...
WebStyles Posted July 26, 2011 Share Posted July 26, 2011 google "PHP file upload" and I'm sure you'll find many examples. just keep filenames in a database associated to each user, so that you only present them when logged in. (just out of curiosity, if you don't have a clue how to upload a file, how on earth are you building an entire social network?) Quote Link to comment Share on other sites More sharing options...
jdowen2211 Posted July 26, 2011 Author Share Posted July 26, 2011 Well the social network gives people their own profile and they can message people but I'm learning as I go along. Quote Link to comment Share on other sites More sharing options...
WebStyles Posted July 26, 2011 Share Posted July 26, 2011 things to consider when allowing random users to upload files: - SIZE : limiting file size - NAME: changing filename to something unique, so they don't get overwritten - STORING: placing all in same folder, or a folder for each category, or a folder per user (depending on the amount of files you expect) - TYPE: limiting allowed file types to avoid malicious files - BANDWIDTH: limiting number of uploads/downloads per user / per day (avoid bandwidth problems) - VIRUS: Implementing and anti-virus system on server to scan files hope this helps Quote Link to comment Share on other sites More sharing options...
jdowen2211 Posted July 26, 2011 Author Share Posted July 26, 2011 Yeah I had all that in mind anyway but thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.