Search This Blog

Friday, May 3, 2013

Simple Php Login page without Database

Welcome to Designers Dairy blog here i have posted How to create a  Simple Php Login page

without Database

Step 1:  Create Login .html  and save

Login.html


<form action='logins.php' method='post'>

                  Username : <input type='text' name='username'> <br/>

                  Password : <input type='password' name='pass'> <br/>

                                       <input type='submit' value='Login'>

            </form>


Step 2: Create Login .php and save

Login.php


 <form action='login.php' method='post'>

                  Username : <input type='text' name='username'> <br/>

                  Password : <input type='password' name='pass'> <br/>

                                       <input type='submit' value='Login'>

            </form>


<?php

    $username = $_POST['username'];
    $password = $_POST['pass']; 

   if($username == 'admin')
 {

      echo "Login Successfull";
     
      header('Location: booked.html');    

   }

   else
 {

      echo "Username and Password does not Match";

   }

?>

Step3 :  Have A fun.............!

No comments:

Post a Comment

Validating to select in sequencial order using angular

    < input type = "checkbox" (change) = "handleSelectTaskItem($event, taskItem)" [checked] = " taskItem . i...