PHP: Complete Login and Registration System with PHP & MYSQL

Build a Complete & Secure PHP Login and Registration System with PHP and MySQL - Email Activation and lots more
4.6 (90 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
1,129 students enrolled Bestselling in Login
92% off
Take This Course
  • Lectures 40
  • Length 6 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 6/2015 English

Course Description



LAST UPDATED 30 June 2016

PHP Login and Registration system step by step -> One of the skill-set that is a must have for any PHP web developer is the ability to code a secure registration and login system. This course is designed to equip you with the fundamental skills needed to create a registration and login system using PHP and MYSQL Database.

Additional resources, quizzes, and assignments will be given throughout this step by step PHP Login and Registration system course, to continually test your knowledge.

You will not just learn how to write a login and registration script but how to build and secure a PHP web application piece by piece.

Some Main Features:

1. Account activation by email, using PHPMailer 

2. PHP Remember me functionality

3. Secured Password hashing with PHP hash algorithm

4. PHP Password Reset / recovery by email system

5. Protecting Against CSRF Attack with Unique secured PHP Token Generation

6. Custom Functions in PHP (A lot)

7. Change Password

8. Deactivate Account

9. PHP Automate Task with Cron Job

10. Constantly update mostly based on genuine request from students 

After completing this step by step PHP Login and Registration system course, you would have gained some useful and practical skills that will help you in your goal to become a web developer or give you an edge in your current job.

Timely Support !

If you ever encounter any problem why taking this course, don't worry I am always here to help and guide you through.

What are the requirements?

  • Text Editor
  • Understand Basic HTML
  • Already Setup PHP Development Environment running PHP 5.5 or higher, with little understanding of PHP (e.g. you should know what is a variable, an array just basic knowledge)

What am I going to get from this course?

  • Code a registration form with PHP
  • Code a secured Login Form with PHP
  • Create and manipulate database content with PHP
  • System Security and in-depth Validation
  • Automatically Logoff Inactive Users
  • Send Account Activation Link by Email
  • Protecting Against CSRF Attack with Unique Token Generation
  • Password Recovery
  • Keep user Logged In (Remember Me)
  • Code Refactoring
  • Learn workflow
  • Write clean and reusable code
  • Prompt support and value for your money

Who is the target audience?

  • This course is for anyone interested in understanding how user authentication works in PHP
  • Want to enhance your PHP skill set as a web developer

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Introduction to the Course

I'll go over the broad topics we'll cover in the course, as well as how the finish product of the authentication system that we will develop in the course. I'll also covered what is required to take this course, target audience and the benefits that will be derived from taking this course.

Section 2: Database Setup

In this lectures we'll go over creating a database and the table for storing user information and also create the project files.

4 questions

Test your knowledge of PDO


In this lecture we'll code our database connection script and test our connection

1 page

Test students understanding of the concepts discussed in this section

Section 3: Building a Registration and Login System

In this lectures we'll design the markup for registration and login form, index and logout page.

In this lecture we'll code the registration form and create demo user accounts

In this lecture we'll learn how to validate our registration form


In this lecture we'll learn how to refactor our validation code and improve the functionalities

In this lecture we'll code the login form and signin users
1 page

Creating a simple contact form to collect username, email address and message, this activity will help reinforce the skills learnt in this section such as validating HTML form, connecting and adding records to the database


In this lecture you will learn how to add password reset functionality to the auth system while in option 2 (Lecture 29) you will learn how to send password reset link to users email address and program the recovery script.


In this lecture you will learn how to use PHP Custom Functions to make code more efficient and clean.

Section 4: User Interface Design - Bootstrap
Lets take a break from coding and spend some time improving the user interface of this system.

In this lecture we'll pull in Bootstrap files and set up things


Enhancing Login, Signup and Reset Password Forms

Enhancing the Menu and Messaging
Learn how to  Automatically Activate current page Menu.
Have you tried Sweet Alert? You will love it.
Section 5: Adding More Functionalities

Lets add the ability to remember logged in users when they choose to


In this lecture you will learn how to guard any PHP system and logout users automatically after a predefined period of inactivity.

Section 6: Profile

Students will learn how to display registered users information from the database


Students will learn how to allow registered users update their record in the database using HTML form


In this lecture you will learn how to add and display a default profile picture for registered users

In this lecture you will learn how to ensure that user upload only specific file type

In this lecture you will learn how write a function that allows users to add a picture to their profile and moves the picture to a location that we define.

4 questions

This quiz will test your understating of PHP Super Global Variables

Section 7: Account Activation

In this lecture you will learn how to use PHPMailer class and Mandrill API for sending Email from localhost using WAMP Server, in the next lecture you will learn to how to prepare and send activation link to user email address.

P.S: As at the time of recording Mandrill API was still free, consider using the GMAIL option (See the PDF file for instruction).

Setup PHPMailer to Send Mail from localhost with XAMPP Server and GMAIL Option

In this lecture you will learn how to prepare and send account activation link to users as they register, you will also learn to change the database structure to accommodate changes.


In this lecture you will learn how to program account activation script and also update the login script to allow access to only those users that have activated their account.

Section 8: Wrapping up - More From ICT Design HUB

In this lecture you will learn how to send password reset link to users email address and code the password recovery script.


Invalid Username Bug Fix (Highlighted by a Student.


In this lecture you will learn about Cross Site Request Forgery (CSRF) Attack and how to secure your PHP web app against such attack.


In this lecture you will learn how to add change password functionality to the system so that registered members can change their login password.


In this lecture you will learn how to program the functionality to allowregistered users deactivate their account and preserve the account information for 14 days (Facebook style).


In this lecture you will learn how to code the functionality to Auto Activate a users account if the user attempts to login within 14 days after deactivating their Account.


In this lecture you will learn how to delete the account and related properties of a user who has deactivated their account and has not logged in again after 14 days.


In this lecture you will learn to code the functionality that will auto delete accounts that has not been activated 3 days after registration, in order to keep the system clean.


In this lecture you will learn how to upload a system developed locally to a remote server so that it can be accessible over the internet.


In this lecture you will learn how to automate task using Cron Jobs. We create a PHP cron job task that will run once daily calling our script that will delete all non-activate account 3 days after registration and accounts that has deactivated and the user did not logged in after 14 days. 

This is a safe and easy way to keep our database clean and free from inactivate accounts that can create a loophole in our system.


The article will show you how to download the source code and stay up-to-date with updates and bug fixes automatically.

Bonus Lecture - Discounts

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Osayawe Terry Ogbemudia, Fullstack Developer at Visual Math Interactive Sdn. Bhd

Terry is a professional Computer Scientist, thoroughly skilled and experienced in Information Technology, Software Development and Web Programming.

He ventured into Software Programming and Database Administration in 2007. Terry holds an undergraduate degree in Software Engineering from University of East London, and is also a certified Oracle Database Professional (OCP).

Having a passion for teaching, he seizes every opportunity that he finds to impact into others. In 2008, he facilitated high-end trainings in Oracle Database, Linux Operating System, Oracle Financial 11i, and Web Design at KarRox and 2010 at NIIT.

He is the founder of Terdia Technology Solutions, an Information Technology Company, which provides integrated solutions that leverage Information Technology and knowledge of business processes.

Ready to start learning?
Take This Course