This is a pretty complex script for a novice, but lets see what we can come up with.
First of all, you'll have to create a table in the mySQL database that contains the usernames and passwords. Your script will need this so it can authenticate users (i.e. tell which users are supposed to see what and who has access and who does not).
Next, you will need to come up with a login script. This script will basically check to see that the values submitted by the login form concur with that in the database. If the data is correct, you will need to set a cookie on the computer of the person logging in. This is easily accomplished with the setCookie() method. If the data is not correct, simply redirect them to an error page.
After logging in, each restricted page needs to check to see if there are cookies on the computer of the person requesting to view the pages. This makes sure that the user requesting the pages has logged in successfully. This is easily accomplished as well because with each http request, the cookie data is automatically sent to the server by the browser without the server actually having to request it.
The way to do the page where you want some users to see some things and others to see different things is pretty easy. Once you have checked to see if the cookies are on the viewers computer, you can check the values of those cookies (assuming that different people have different login information) and generate HTML accordingly.
This is a rather abstract description of what needs to be done, but it's at least enough to point you in the right direction. If you have further questions, feel free to email me at jp_reed@yahoo.com.
Best regards,
Jeremy Reed
jp_reed@yahoo.com