Dear friends,
I have an other problem in login code is below..

//********************************connect to database and check****************************************************
$username = "root";
$password = "";
$database = "mydatabase";
$server = "";

$conn= new mysqli($server,$username,$password,$database);
       // checkintin connection

                              die("connection failed:".$conn->connect_error);
   //****************fetch the information from database for match username and password *****************************
   $sql = "SELECT * FROM login1 WHERE L1='$username'";

                              echo "invalid username"   ;       
                       echo "welcome";           

it is login.php form connected database but does not reconize user name and password?

Try using result->num_rows instead (it returns number of rows found):

if($result->num_rows == 0){
    echo "invalid username" ;
} else {
    echo "welcome";

Thank you very much Bro1
Problem is solved