Write an article or Share a link

Login System Using OOPS Concept In PHP

Hints Staff
5 years ago
Login System Using OOPS Concept In PHP by html hints

Login System Using OOPS Concept In PHP


In this article, get all information about how to make Dynamic Login System Using OOPS Concept with Demo & Free Source Code.

I will also show you how you can make page accessible only to logged in users. Any other user not logged in will not be able to access that page. For this i'm going to use session of PHP

SOURCE CODE DOWNLOAD


For Demo & Free Source Code Scroll down.

The main factor in this Login System is that is made using OOPS CONCEPT, means that in this all codes are reused which increase it scalability to use.

Quick Start, you need these files to start work on this:

  • 1. Download and unzip into a folder
  • 2. Create a database and import the users.sql file
  • 3. Change the database settings in class/database.php
  • 4. Run login.php

STEP 1
THE DATABASE


After downloading source code file for this. You will find users.sql file. That file, contains all information about database to be needed for this.

            
-- Database: `imt`
-- Table structure for table `login`
CREATE TABLE `login` (
    `id` int(11) NOT NULL,
    `name` varchar(255) NOT NULL,
    `email` varchar(255) NOT NULL,
    `password` varchar(255) NOT NULL,
    `phone` varchar(255) NOT NULL,
    `created_on` datetime NOT NULL,
    `update_on` datetime NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
            
        

STEP 2
THE PROCESS


Here, I'm going to elaborate how to use files after downloading them.

# In database.php

First, you need to configure database according to your server. After this process you can start further process. Below is the code to connect database.

        
// connect to the database
$servername="localhost";
$username="root";
$database="imt";
$password="";
        
    

After these changes you are set to run login.php in localhost server such as xampp or wampp

You will get all files, when you download the source code. And after than you can edit it according to you

if you face any issues you can contact by asking question on Developers Community

You can go through Demo as well as Download source code for the same & make changes according to you

FormPHP

We use cookies to ensure better User Experience. Read More