I have two username and password with an additional field called access level.
For the sake of this explanation lets call them:
admin - abc password - page1.php and page2.php
guest- xyz password - page2.php
I have a page called 'index.php' wherein i will input my username and password. I also have a 'page1.php' and 'page2.php'I want the admin to access 'page1.php' and 'page2.php'.. While the guest can only access the 'page2.php'.
This is a rather enormous question by itself. Have you made any headway into setting the script up? If so, you may have better luck asking questions to specific to the stage of development you are currently in. We won't write the entire script for you, so we need to have some angle to approach in helping you.
You're going to want to look into form handling to start. That includes checking values for integrity and correct types. Then you're going to want to learn how to use sessions and/or cookies to maintain the information for a logged in user.
A simple way of doing this would be to store the admin information in a database (or file if you don't have access to a database). Then on the index.php (or what ever page is loaded by default) check to see if the user has a cookie (a small bit of information that is can be stored on each connecting computer) with a correct [pseudo]random string.
If the strings match you can assume that the connecting user has either copied the data or is an admin. If the user appears to be valid you could send them to page1.php (where you would want to validate again) or if they don't then off to page2.php.
If you have any specific questions (or about the flow of a basic authentication system) don't hesitate to ask.