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

Milan Bogdanovic
Milan Bogdanovic
9,922 Points

Build a simple Php Application_Login

Is there any course on treehouse which will explain how to do a login form in php? Or there already exists? I believe a login form must exist for any e -commerce website.

Kind regards.

2 Answers

Lukas Smith
Lukas Smith
4,026 Points

IS many courses i think. In php it is easy. in html you need put form with 2 fields (login, password) and send it to your controller , this controller send to model request is this user exist in your Data Base and if Yes U set session and redirect to main web after login, if not show the message.

You also have to hash passwords, protect against SQL insertion, and other hacks. Then you may want groups and approval prior to being accepted as a registered user.

I hope a course is coming soon that builds a user class that covers all of these topics.

Milan Bogdanovic
Milan Bogdanovic
9,922 Points

Thank you for the answer, i'm looking forward to that course. Hope it won't take long until the course is online.