Start with basic page which contains a form
<form action="access.php">
<input type="textbox" name="username" />
<input type="textbox" name="password" />
</form>
the second page access.php would contain
<?php
if ($_GET["username"]=="kumar" && $_GET["password"]=="manas")
then echo "Logined!!"
else
echo "Failed"
?>
You can try this. Also you can pull data from database for comparison of password.
For more detailed tutorial try
PHP Tutorial.