How to Build a Login System for a Simple Website
In today's video tutorial, we'll be building a login system with PHP and MYSQL. Many, many features will be covered; including MySqli, Prepared Statements, jQuery, Classes, Sessions, Cookies, etc. I bit off more than I could chew for today's screencast. So, I'll be creating a Part 2 in the next couple of weeks in order to improve our system even further.
Finished! ....For Now
We've managed to get an enormous amount of work done in about forty-five minutes; but there's much room for improvement - specifically when it comes to optimizing our class files for reuse. Before I let you go, let's take a quick look at what we'd like to accomplish in Part 2.
What We Need to Accomplish in a Future Tutorial
- Set an expiration date after creating a session - so that the user is automatically logged off after X minutes.
- Allow users to sign up and edit their passwords.
- Update our database to contain "secret question/answer" questions for username/password retrieval.
- Refactor our class files. As I mentioned in the video tut, there are a few procedures that we should remove from our methods in order to promote "best practices", and increase reusability as much as possible.
- Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.