if you are using PHP, I am going to assume that you are on a linux server. On linux servers (and maybe windows also, I don't work with windows) there is a way to set permissions on a given folder.
You can add users who can access the files in the folder through password protection. They only have to put in the password once until they log off (the browser is closed). The way I password protect my sites is putting all of my "protected" files into one folder and using the server's password protect function, instead of writing my own code to do the same thing.
If you are using a web hosting service, look around on your ftp page, and see if you can't see anything that talks about permissions. The user set up will be in that area.
If you have your own server, you are on your own. I would assume that setting permissions is relatively strait forward once you find the permissions pane.
CNET Forums;
I am trying to build a protected area for my clients on my website, however it won't work. I have gotten as far as allowing them to login, and logout, however when you go to the protected page, you can view it without logging in. I want to make that page, and all pages that are protected only viewable with the proper credentials.
Here's the code for the protected page:
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
Thanks!!
-Richard Escobedo
http;//networks.richard-escobedo.com/protected/login.php

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic