Published on February 28, 2021 Updated on June 13, 2024

PHP Login System

Today I will tell you how to create a login system with PHP.

Okay let’s get started.

1st step

First watch this video to get a idea.

Videos are disabled. Click here to watch

Okay now first create a database named “demo”.

Then add this code into the SQL console.

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

That’s all download this file and extract to the location you want to execute the login system .

Link

Something wrong or just found a typo? Edit this page on GitHub and make a PR!

Comments