Signup and Login with PHP and MySQL

Learn how to create signup / registration, login and logout using PHP, MySQL and best practices.

Please consider supporting my channel:
https://ko-fi.com/davehollingworth

Part 2: PHP Password Reset by Email is here: https://youtu.be/R9bfts9ZFjs

In this video you’ll learn how to:
• create a signup page
• validate the data on the server in PHP
• save the signup data to a MySQL database using PHP
• create login and logout pages
• validate the data in the browser using JavaScript
• validate the email using an Ajax request

Code shown in the video:
‣ https://github.com/daveh/php-signup-login

Relevant documentation:
‣ https://watercss.kognise.dev/
‣ https://www.php.net/manual/en/function.password-hash.php
‣ https://just-validate.dev/

00:00 Introduction
00:23 Signup form HTML
03:24 Add classless CSS
04:04 Process form in PHP
05:12 Server-side validation
08:33 Hash the password
09:59 Create the MySQL database
11:36 Connect to the database from PHP
14:27 Insert a new record
17:00 Prevent duplicate emails
18:55 POST / Redirect / GET
20:33 Login form
21:53 Process the login form
24:45 Verify the password
27:45 Use the session for login
28:10 Add index page
30:42 Add logout page
32:22 Show logged-in user’s name
34:30 JavaScript signup validation
37:35 Custom validation
39:20 Remote validation
42:49 Summary

#PHP #MySQL #signup #login

Source: https://www.youtube.com/watch?v=5L9UhOnuos0

Leave a Reply

Your email address will not be published. Required fields are marked *