Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS AWS Certified Developer - Associate CompTIA Security+
Photoshop Graphic Design Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Mindfulness Personal Development Personal Transformation Meditation Life Purpose Coaching Neuroscience
Web Development JavaScript React CSS Angular PHP Node.Js WordPress Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee

This course includes:

  • 5 hours on-demand video
  • 91 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
Development Web Development PHP MVC

Build a Complete Registration and Login System using PHP MVC

Add registration, login, remember me, account activation, password reset by email and more using the PHP MVC framework
Rating: 4.6 out of 54.6 (524 ratings)
2,410 students
Created by Dave Hollingworth
Last updated 7/2017
English
English [Auto]
30-Day Money-Back Guarantee

What you'll learn

  • Let new users sign up for a new account
  • Validate the users' registration data, both on the server and in the browser
  • Store passwords securely in the database
  • Allow users to log in using their email and password
  • Restrict content to logged-in users only
  • Use sessions for handling logins
  • Use cookies to optionally remember the user's login
  • Allow users to securely reset their own passwords when they forget them
  • Let users update their own profile details
  • Use a CSS UI framework to easily add styling to a project

Course content

14 sections • 106 lectures • 5h 9m total length

  • Preview01:40
  • Preview02:00
  • Preview01:45
  • Preview01:33
  • Preview02:38

  • Preview02:34
  • Preview04:10
  • Preview03:41
  • Preview02:46
  • Preview02:19
  • Preview03:47
  • Preview01:36
  • Preview04:07
  • Preview04:01
  • Preview04:35
  • New user signup
    7 questions

  • Validate the data before saving the new user record
    03:56
  • Validate the email address is unique in the user table
    02:11
  • Display validation error messages in the signup form
    03:30
  • Prevent duplicate form submissions using the Post / Redirect / Get pattern
    02:04
  • Redirecting to another page using PHP: how, why and best practices
    05:15
  • Redirect to the success page after a successful signup
    01:12
  • Validate the signup data on the server
    4 questions

  • Why you should validate data on the server as well as the client
    02:45
  • Validate the signup page in the browser using HTML5 validation
    02:59
  • Add a JavaScript validation library
    03:34
  • Validate the signup page in the browser using JavaScript
    03:11
  • Validate the format of the password with a custom validation method
    02:19
  • Validate the email address is unique using an Ajax request
    05:04
  • The password confirmation field: why it's a problem and how to fix it
    01:46
  • Remove the password confirmation field and add a show password button
    02:41
  • Validate the signup data in the browser
    5 questions

  • Create and display the login page
    03:14
  • Create the login action in the controller
    02:01
  • Find the user object using the email address
    05:01
  • Authenticate the user by verifying their password is correct
    03:09
  • Redisplay the email address in the login form when authentication fails
    01:30
  • Add a redirect method to the core controller
    01:45
  • Sessions in PHP: make the web browser remember you
    05:17
  • Use the session to remember the login and view the logged-in status
    04:10
  • Sessions in PHP: completely destroy a session, even without closing the browser
    03:05
  • Destroy the session to log the user out
    02:32
  • Sessions in PHP: prevent session fixation attacks
    04:22
  • Login
    6 questions

  • Add a class to organise the authentication code in one place
    03:55
  • Restrict a page to logged-in users only
    03:02
  • Redirect back to the originally requested page after login
    03:03
  • Add a method to the core controller for requiring login
    02:01
  • Require login for all action methods in a controller
    01:59
  • Add a base controller that requires login for all action methods
    03:04
  • Get the current authenticated user in controllers and views
    03:27
  • Simplify the code: remove the isLoggedIn method
    02:33

  • Flash notification messages: display status messages to users
    02:47
  • Add a flash message when requiring login
    02:07
  • Display the flash messages to the user
    03:03
  • Add flash messages when logging in
    01:49
  • Add a flash message when logging out
    01:55
  • Add a CSS style sheet and style the flash messages
    01:48
  • Add flash message types and give them different styles
    04:36

  • How to remember the login after closing the browser
    04:24
  • Generate unique, random tokens and secure hashes
    03:38
  • Add a class to generate and create hashes of random tokens
    03:51
  • Create a database table to store remembered logins
    02:14
  • Add a remember me checkbox to the login form
    03:32
  • Remember the login in the database
    03:39
  • Cookies in PHP: the basics
    05:05
  • Remember the login in a cookie
    02:10
  • Log in automatically using the token in the cookie
    04:08
  • Prevent automatic login if the remember token has expired in the database
    02:41
  • Forget the remembered login when logging out
    03:50
  • Remember me
    4 questions

  • Allow users to securely reset their passwords when they forget them
    02:40
  • Get access to an email service
    03:13
  • Add a class to send emails
    03:07
  • Create and display the forgotten password page
    01:27
  • Process the forgotten password form in the controller
    02:13
  • Add password reset fields to the user table in the database
    01:30
  • Save a new password reset token and expiry with the user record
    02:04
  • Send the password reset email to the user
    02:51
  • Get the email content from a view template
    03:24

  • Add an action to process the link and get the token from the URL
    02:09
  • Get the user based on the token and check the expiry
    03:55
  • Create and display the password reset form
    02:35
  • Extract repeated JavaScript code out into a separate file
    01:51
  • Process the password reset form in the controller
    02:37
  • Remove duplicated code and add an expired token view
    03:07
  • Validate the password reset form on the server
    05:38
  • Reset the user's password and clear the token and expiry
    03:52
  • Password reset
    3 questions

Requirements

  • You need to have taken the "Write PHP Like a Pro: Build a PHP MVC Framework From Scratch" course
  • You should already be familiar with the basics of PHP, HTML, CSS and JavaScript
  • You should be comfortable installing software on your computer
  • You need to be familiar with the model - view - controller (MVC) pattern

Description

Learn the basic concepts, tools and functions that you will need for user authentication using a PHP MVC framework.

Add registration and login to the PHP MVC framework we built on the "Build a PHP MVC Framework From Scratch" course.

  • Let new users sign up and log in
  • Store passwords securely in the database
  • Restrict content to logged-in users only
  • Use sessions for handling logins
  • Use cookies to optionally remember the user's login
  • Allow users to securely reset their own passwords


Build Registration and Login using Models, Views and Controllers

Most websites and web applications need user authentication. Once users sign up to your site, you can tailor content specifically to them, and restrict content to logged-in users only.

By developing user authentication using an MVC framework, your code will be easier to write and maintain.

All the concepts you need to know to understand why the system is developed the way it is are explained in detail.

Content and Overview

I designed this course to follow on from the Write PHP Like a Pro: Build a PHP MVC Framework From Scratch course. At the end of that course you had built your own PHP MVC framework. If you want to add user registration and login to that framework, then this course will cover all you need to know, starting from where that course left off.

Starting with the basic concepts of authentication, this course will take you through all the steps needed to build a complete registration and login system, one piece at a time.

Beginning with the PHP MVC framework from the previous course, each lecture explains what you're going to add to the code and why, building up the project step by step. At the end of this course, you'll have built a complete registration and login system using the PHP MVC framework, ready to use in your own projects.

Complete with working source code at every stage, you'll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course. Also, at all times throughout the course you have access to the instructor to ask for help with any topic related to the course.

Who this course is for:

  • This course is for those who want to add authentication to the PHP MVC framework
  • This course is NOT for you if you're not familiar with MVC

Featured review

Ronaldo Scotti dos Santos
Ronaldo Scotti dos Santos
34 courses
4 reviews
Rating: 5.0 out of 5a year ago
Just amazing! It is the second course that I take with Dave, and I've no regrets. His didatic is amazing, his support and avaiablity are out of this world. He goes beyond the average, shows security tips and code patterns that other instructors just ignore. I'm definitely satisfied with the course content, and I would be very happy if he launched new courses!

Instructor

Dave Hollingworth
IT Trainer
Dave Hollingworth
  • 4.6 Instructor Rating
  • 5,254 Reviews
  • 20,109 Students
  • 9 Courses

  Hi, I'm Dave Hollingworth. I'm an IT trainer and web application developer. I've been programming for over thirty years, and teaching IT since 1999.

    I've developed enterprise-level applications on platforms ranging from mainframes to mobiles: from my first web application, a quotes system created for a major insurance company back in 1999 - the first of its type in the sector - to interactive learning management systems for online language learning. 

    I've taught courses ranging from basic use of email to advanced web application development, both online and in-person. I've been teaching on Udemy since 2012. 

    I'm passionate about technology, and love teaching it! I believe it's possible to explain even the most complex subjects in a simple, straightforward way that doesn't confuse the student. 

    I look forward to welcoming you onto one of my courses! 

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.