Welcome to Webune Forums. At Webune we value our customers. Many of our customer have live websites using PHP. We get asked frequenly from customer who are staring their data-driven websites how they can make secure login forms in their websites. They want to be able to have a login form and then check the user's information submitted on a HTML form. if the username and password match, they want their users to be able to access their member's only section.

Well, today is your lucky day. Here at Webune we are going to make that happen to you and show you how its done using a simple PHP script that verifies the user's username and password against our configuration.

there are many ways to authenticate users, one of the most basics way is to authenticate users through sessions or cookies. so we are going to start with that. but as you get more advanced, you will start to learn that you can make your login authentications by using database driven authentication. its more secured and reliable but it uses more resources from your server. with that said, lets start.

fist we need to create the html to create a simple login form..

something that looks like this for example:

Username:
Password:

ok, the best way to learn is to see it in action. I am using a Windows XP computer to write this tutorial, so i will be using notepad as my text editor. so open a blank notepad.

Download the attached file at the end of this post

now open 22-p2046-how-to-make-a-login-form-with-html-php.php

ok, now upload login-form.php to your PHP website
[NOTE: YOU WILL NEED TO HAVE PHP ON YOUR WEBSITE FOR THIS TO WORK]

now open login-form.php with your browser on your website and see it in action. as you can see, making a login form to authenticate users can be easy. and creating this form was easy and simple for authentication.

please give us your feedback.. if you have any question or comments

22-p2046-how-to-make-a-login-form-with-html-php.php