Friday, May 24, 2013

Simple PHP Login Form

How to create a login page ? 

That's the question. How do we create a login page ?, If you are a pro maybe this post sounds easy for you, and if there's a mistake on this post, please let me know.  Login Page is a page that contains a script to login user from your website to use features of your website, for example,, those sites will not let us use it's features if we not login. In this post i would like to create a simple login page. Let's Begin :

What you need :
1. XAMPP (a free and open source cross-platform web server package).
2. Editor like notepad or notepad++

1. Open your Browser, and type or http://localhost/phpmyadmin on the address bar.

2. Create a database and type the name, then click Create

3. Open your “tutorial” Database and on the create table type login on the name form and 3 for Number of Columns, then click Go.

4. On first column set Name : id | Type : int | Length : 3 | Index : Primary | A_I : Check
Second column Name : username | Type : varchar  | Length : 25
Third column Name : username | Type : varchar  | Length : 25
Then click save.

5.  Click insert on your login table, new window will show up.

6. Insert value for id, username, password, click Go.

7. Database Creation Completed.

II. Login Page

1. Open your editor, then type :

Save it on your htdocs as index.php.

2. Now let’s create loginprocess.php .
Save it as loginprocess.php

3. Create config.php
4. Test your login page.


Post a Comment