Your issue requires a bit more work from your side. In order to create a login system I recommend you implement PHP on your web page. Before doing that make sure the server you are currently using supports PHP and MySQL because we will be using those.
We will need to create about 3 PHP files for this to work, in order to create them you can simply use a text editor and implement the PHP code and then save it as .php , or you can download a software used in web development, such as Adobe Dreamweaver that makes you able view the code side of the page and the design side of the page on your PC, so you will be able to tell how your webpage will actually look on the internet, for the customer.
If you're server is using CPanel or Plesk(the most common and used control panels) , then you will be able to quickly spot the phpMyAdmin tool that is used to manage the MySQL database, if you're using any other control panel just ask your hosting provider for instructions in case you have difficulties finding it.
While in phpMyAdmin , create a new database and name it "customer" and under it, create a table called "members" , by running this SQL code:
CREATE TABLE `members` (
`id` int(4) NOT NULL auto_increment,
`username` varchar(65) NOT NULL default '',
`password` varchar(65) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
INSERT INTO `members` VALUES (1, 'customer1', '1234');
Now create a page named "login.php" , this will be the page used for your custumers to login with a username and password.
Use the fallowing code for login.php :
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<form name="form1" method="post" action="checklogin.php">
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<td colspan="3"><strong>Customer Login </strong></td>
<td width="294"><input name="username" type="text" id="username"></td>
<td><input name="password" type="text" id="password"></td>
<td><input type="submit" name="Submit" value="Login"></td>
Next , we need to to check if it's the customer that wants to login, so for that we create a page named "logincheck.php". This page will check if the username and password exists in the database we made earlier.
Use the fallowing code for logincheck.php:
$host="localhost"; // Your server
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="customer"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// username and password sent from form
// To protect MySQL injection
$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
$sql="SELECT * FROM $tbl_name WHERE username='$username' and password='$password'";
// Mysql_num_row is counting table row
// If result matched $username and $password, table row must be 1 row
// Register $myusername, $mypassword and redirect to file "customer_area.php"
echo "Wrong Username or Password";
And last, we finally reached our destination, the customer's webpage that he can access only by entering the username and password provided. For this create a page named "customerarea.php"
Use the fallowing code on customerarea.php :
On the last page , customer_area.php as long as you leave the PHP code intact, you can modify and add anything you wish to display your customers with.
You can now upload all these 3 files (in the same directory) on your server and test it out by going to login.php(ex: http://yourserver.com/login.php) and typing customer1 as username and 1234 as password. You can always add more "members" by going back to phpMyAdmin and inserting them into the members table.