You need to implement a basic authentication scheme on those pages.
if (is_logged_in())
{
// user is logged in
}
else
{
// Not logged in, show an error message or redirect back to login page.
}
In the is_logged_in function, you may check SESSION variables containing authentication information, the easiest method, IMO, is to set a variable like $_SESSION['is_logged_in'] with a boolean value. This assumes that this session variable is always assigned a boolean value (best practice), and using a static function instead of just checking the variable allows for possible future expansions or innovations on that functionality, including the addition of access privileges, account activation, email confirmation, etc.
So...
function is_logged_in()
{
return $_SESSION['is_logged_id'];
}
I am just assuming that you're using sessions here, that will work if you're using sessions..
I suppose I should be asking, what type of authetication are use using?
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::