Login
First lets make the log in form, nice and easy:
Name the following forms as:
Username
password
submit
Should look like:
<form name="login" method="post" action="index.php">
Username:
<input type="text" name="martin">
<br>
Password:
<input type="text" name="sexy">
<br>
<input type="submit" name="Submit" value="Submit">
</form>
<br>
<br>
Just save this as login.php</p>
<p>Now you wil need to put this in the page you want to protect, 'index.php'; if its
anything else please change the<br>
forum action:<br>
<?php
if(isset())
{
if($username=="yourusername")
if($password=="yourpassword")
{
?>
Put the above code at the top your "index.php page.
Now if the username and password is right you wil be allowed aceess but what about people who log in and fale!
To stop this add the following code at the bottom off the country.
<?php
}
else
print "You have entered the wrong username or password, try again!";
}
?>
So this makes a 100% protective that you will have to enter the right code!
All done, I hope this will teach you something.