Hi,
I am assuming you meant to say Ï have three colums in my table?
Anyway. That is what you should do:
Create a table "users"
add colum id, user, pass
That is where you will store the user info.
In a form, you will ask people for their username / password, which you submit to login.php:
$result =@ mysql_query("Select * from users where user = '$username' and pass = '$password'");
$NumRows =@ mysql_numRows($result);
if ($NumRows > 0)
{
// place content for authorised people here
}
else
{
$body = "<form action = \"login.php\" method=\"post\">
<input type=\"textbox\" name=\"username\">
<input type=\"textbox\" name=\"password\">
<input type =\"submit\" value=\"inloggen\">
</form>";
}
Then you can add features like password encryption and sessions (To store info on users, wether they are logged in for instance).
But this will give you the basic idea.