Signup and Login with PHP and MySQL
Dave Hollingworth Dave Hollingworth
24.5K subscribers
272,204 views
0

 Published On Apr 11, 2022

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

Recommended hosting:
https://davehollingworth.net/hosting

Part 2: PHP Password Reset by Email is here:    • PHP Password Reset by Email  

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-l...

Relevant documentation:
‣ https://watercss.kognise.dev/
‣ https://www.php.net/manual/en/functio...
‣ 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

show more

Share/Embed