Skip to main content

How Create Login Page with Database and Session Module In PHP

*  Create Login Page With Database *

-> First Download Wamp Server or Xamp Server and Setup Your Drive And Check Avaiblity Of Xamp or Wamp.

-> Create Database in mysql database. and Create New Table and Insert New Record Like User name, Password, Full name, And extra Details....

-> and next Step is Create new page login.php or index.php

-> Write Code on Creating File.

->Establish Connection of Your Databse.

->create new file like config or connection... like(dbuser,dbpassword, and connection details..)

->The Following Code write in your index or Login Page.


<?php

    //old path

    //include('config/connection.php');

    //new path

    include('../../db/connection.php');

    if(isset($login))

    {

        $str="select*from admin where status='active' and user_name='$username' and password='$password';";

        $data=mysqli_query($conn,$str);

        $search=mysqli_num_rows($data);

        if($search>0)

        {

            $_SESSION['user_name']=$username;

            ?><script>window.location='<?php echo $domain_path; ?>dashboard.php';</script><?php

        }

        else

        {

           $error="Incorrect Username or Password...";

        }

    }

?>


Comments

Popular posts from this blog

How to Download Crack version of PUBG ?

  * There are Three Schema Architecture of Download PUBG.   DBMS is a collection of interrelated files and a set of programs that allow several users to access and modify these files. A major purpose of a database system is to provide users with an abstract view of the data. That is tha system hides certain details of how tha   data is stored and maintained. However , in order for tha system to be usable, data must be retrieved efficiently.        Tha concern for efficiency leads to the design of complex data structure for tha representation of data in tha database. However since database systems are often used by non computer   professionals,   this complexity must be hidden from   database system   users. This is done by defining levels of abstraction   at which tha database may be viewed. There is logical or external view, conceptual view and internal view or physical view. The three levels of the architecture are three different views of the data.      1.  External  -  individual

Download PHP Full Source Code Free Template. How to Download Free Responsive Website Templates

  * Important Note To Download Templates * 1. Conceptual Simplicity :  As the information is represented in form of tree structure, it is easy to view, understand, and retrieve the data. This helps the database designer to obtain conceptual clarity of relationship.  2.. Database security :  Security is provided by DBMS. Thus Programming effort is decreased as compared to file system in which programmer has to write the programs for implementing security.  3. Data independence :  If changes are made in design of database, DBMS takes care of cascading it throughout the system. There is no need to make change in system. * Limitation of Download Templates * 1. Complexity :  To implement the database using hierarchical model. programmer needs to have detailed knowledge of how the data is’ stored has to traverse entire tree for the same.  2. Data Redundancy :  To implement many to many ‘relationships amongst data repeatition of data is required. This leads to increased data red  3. Anomali

Advantage and Disadvantage Of PHP Limitation of PHP

               *  ADVANTAGE OF PHP HIERARCHICAL DATATABLE MODELS * 1. Conceptual Simplicity :  As the information is represented in form of tree structure, it is easy to view, understand, and retrieve the data. This helps the database designer to obtain conceptual clarity of relationship.  2.. Database security :  Security is provided by DBMS. Thus Programming effort is decreased  compared to file system in which programmer has to write the programs for implementing security.  3. Data independence :  If changes are made in design of database, DBMS takes care of cascading it throughout the system. There is no need to make change in system.  * DISADVANTAGE OF PHP HIERARCHICAL DATABASE MODELS  * 1. Complexity :  To implement the database using hierarchical model. programmer needs to have detailed knowledge of how the data is’ stored has to traverse entire tree for the same.  2. Data Redundancy :  To implement many to many ‘relationships amongst data repetition of data is required. This le