Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Beau Waldrop
1,341 PointsTrying to create a site where users upload their own content
Hello all, I need help on where to begin. Currently, I'm real familiar with HTML CSS, Less, and some Javascript. However, in an attempt to learn more, I'm hoping to create a site that allows users to create a login and upload their own content.
Right now, I'm trying to decide between using Ruby or PHP? Any suggestions?
I'm assuming if I go with Ruby, I would still need to create a database right?
Is there a way to check to make sure the content that's being uploaded doesn't contain a virus?
I want this to be secure, obviously, any ideas on protecting it from being hacked?
Any advice on who to use to host this site?
Thanks. I'm not sure if I'm in over my head or not. But I always find building something is the best way to learn. Thanks
9 Answers

John Wheal
27,969 PointsI would use PHP. This is a good place to start http://www.w3schools.com/php/php_file_upload.asp
Start with uploading images and go from there.

James Barnett
39,199 Points@John- Please don't link to W3Schools they are not a reliable source of information and in no way affiliated with the W3C.

Randy Hoyt
Treehouse Guest TeacherHey Beau,
We've talked quite a bit about where to start learning server-side programming on this forum and other places. If you want to learn how to make web stuff with server-side programming, you should start with PHP. (I'll add a couple of links to some of the other threads shortly.)
However, I do think that this project might be a bit much for starting out. :~) I would probably recommend that you use a backend-as-a-service provider like Parse for this. They handle user authentication and data/file storage through an API using a JavaScript SDK or a simple REST API. Integrating with them will teach you all kinds of valuable skills about integrating with APIs, and they'll handle a lot of the security issues around user authentication and file uploads. It will be challenging and you'll learn a lot, but there's a good chance that this is not too much to try to learn.
If you are really keen to learn server-side programming, I'd recommend going through my PHP course to get a really good foundation in how forms and web servers interact. We have three PHP courses planned in the series, and I'm working on the second course now.

Randy Hoyt
Treehouse Guest TeacherHere are some of the threads I mentioned:

James Barnett
39,199 Points@Randy - That was a round up. +1
Also Parse looks pretty intresting

Beau Waldrop
1,341 PointsThanks Randy. Parse looks great, but I'm doing this for a local non-profit who has very little money to spare. (This would require more than 1GB of storage as users would be uploading videos).
I'll go through your PHP course and may decide to scale down the website. Also, would love a full course on API. I think it's covered some in the iPhone app course, but full course on it would be awesome. Just sayin' :-)

James Barnett
39,199 Points@Beau - Codecadmey has a course on using the Parse API with JavaScript

Beau Waldrop
1,341 PointsThanks James. I don't remember seeing that last time I was there. I guess it's new. I appreciate it. I'll check it out.

Matthew Ong
6,041 PointsInstead of having the users upload the videos directly to your database, its much easier to upload them to YouTube and then embed the videos on the website