Good idea, but I'd add as an extension that:
if ($loggedin)
{
// do sitestuff here
}
else {
header( "Location: http://my_url/my_path/not_logged_in_error.htm" );
}
could be a better idea. That way, the user is directed away to an error page (or maybe a logon page) if s/he isn't already logged in.
it would do. but i think it would be not as
dirty if you do something like this:
if ($loggedin)
{
// do sitestuff here
}