The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Having trouble with my user authentification script

I am building a simple user recognition script, but I am having some trouble with the following parameters:

I am able to redirect the user following the username and password validation to the page I desire.

What I need to do right now is find a way to protect the pages that the user is being redirected too. I don't want to use cookie recognition so I'm trying to include a condition in the pages I wish to protect.

Is the page dynamically generated? Just include the above snippet at the top of the page before you pull information from the database etc. If each user has a separate static page, then redirect to the page in an "else" branch depending on the username etc.

Since they are static, does each user's page have the same essential features, content, etc? If there are only minor changes between pages, a database/synamic page might suit your needs better, and save on maintenance issues as PHP John said.