Pages

How to create simple login box using PHP

PHP Login Box


     Hello everyone, after a long time today i came up with new tutorial. Today i am going to teach you How to create a Login Box Using PHP.

        First of all you have to create interface to your login box using basic HTML <input> element.

 
              


     **Save this as LoginBox.php. 
     **Save this inside your "www" folder.

     After doing this, you can connect with your MySQL database and retrieve your data. But in here i use some hard coded values for username and password. I will tell you connecting database in another lesson.
  
       In here if user enter correct username and password, it will prompt a alert and redirect to the google.lk. So, to do this we need to type following php code,