Creating Login Form Using PHP and MySQL

Tutorial from Dave Hollingworth at https://www.youtube.com/watch?v=5L9UhOnuos0&t=2106s&ab_channel=DaveHollingworth


Writing this because I have a bad memory. For future use only.

Things to do before running:

1.) Download XAMPP ---> https://www.apachefriends.org/
2.) Go to XAMPP Control Panel
3.) Turn ON Apache, and MySQL
4.) Go to localhost/phpmyadmin or click Admin in XAMPP Control Panel
5.) Build database as "login_db"
6.) Create 4 tables as "user"
 1. id

  • data type must be INT(11)
  • A_I (AUTO_INCREMENT)
  • keyname must be PRIMARY

 2. name
  • data type must be varchar(128)

 3. email
  • data type must be varchar(255)
  • keyname must be UNIQUE

 4. password_hash (a)
  • data type must be varchar(255)
![image](https://user-images.githubusercontent.com/74046232/196758256-0928efb0-c2d6-4ff5-87a5-95e5957b9427.png)