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

General Discussion

Jonathan Warrick
Jonathan Warrick
3,191 Points

Building a Database-Driven Website from Scratch (HTML/CSS/PHP/MySQL)

I’ve recently picked things back up with Treehouse with the goal of creating a web-based project (and perhaps a mobile app farther down the line) that I’ve had in mind for some time now. Currently, I run a little game for a band I follow (i.e.; obsess over), wherein fellow fans submit the songs they think will be played on a given night and receive points for guessing correctly. I’m doing this in a spreadsheet right now in a very manual, time-consuming fashion. I’m looking to create a database-driven website that would remove almost all of the manual day-to-day updates while putting my skills to use in a real-world setting. The main features of the website are as follows:

-Allow users to register; upon registration, user’s username, password, e-mail address, etc. get submitted to a table and saved, allowing them to log-in in the future and use the features of the website.

-Allow users to submit their picks for a given show. Users will submit their picks using a drop-down of all possible songs that could be played; upon submission, the users’ picks will be submitted to a table and saved.

-“Scoring” will be done by comparing users’ picks to songs actually played on a given night, using the pre-existing rules of the game. The set list (i.e.; songs played for a given night) will be pulled from an existing database that another fan updates regularly after each show, so I won’t have to manually input each night’s song list.

-Users will be able to then see the “standings” based on scores. Standings table will include filters for years, specific tours, etc. and will be sortable by username, high/low score, etc. Users will also be able to look at their history of submissions for each show and look at each individual show to see all users’ submissions.

I’m looking to implement most of these features using PHP and MySQL, but were interested to see what the community can suggest! A few specific questions I have are:

-Is using PHP and MySQL the best approach (or at least an appropriate one) for this project? I’ve made my way through a good chunk of the PHP track and use SQL/other database tools at work quite frequently, so I feel like I’m approaching the point where I can actually begin to turn this into a reality.

-Should I begin by writing up the basic structure of the website in HTML/CSS and then putting the functionality in after that basic template is ready? Should I leverage some sort of framework/template for this or do all of the HTML/CSS myself (other than a few static websites, my HTML/CSS skills are pretty basic, so this might help strengthen those as well)?

-Are there any frameworks/tools/other considerations I should keep in mind while doing this? Basically any help and guidance is appreciated!

Thanks in advance!

1 Answer

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hey there!

Sounds like a cool and useful web app! I think you're right on track with doing an HTML/CSS design as you build out the functionality with PHP. You might want to start with Bootstrap as a jumping off point for the front-end.

Hope that helps!