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

PHP

Paul Criscitiello
Paul Criscitiello
3,313 Points

How to make user login for php website

Are there any tutorials on how to integrate a login into my php site. I know how to make an html form and save data to a database, but need help fully implementing a login that only allows logged in users to have access to certain parts of the website.

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

It's not a perfect answer, but some of the best php tutorials for free I've seen are from Alex at Codecourse: https://www.youtube.com/user/phpacademy

He has at least two auth systems in php.

One uses slim, the other is home rolled I believe.

I have no idea how outdated this is anymore, it's about a year old, but it's the home rolled on I believe: https://www.youtube.com/playlist?list=PLfdtiltiRHWF5Rhuk7k4UAU1_yLAZzhWc

See if that doesn't help you.

Paul Criscitiello
Paul Criscitiello
3,313 Points

Thanks! I'll check this course out. It doesn't seem Treehouse has anything related to building a user login.

Kevin Korte
Kevin Korte
28,149 Points

Not really, that I've seen, or at least as details as the course I linked. You could certainly learn to build your own with the foundation pieces of the php courses, and I would imagine that there is at least some mention of using a php framework like Laravel or Slim.