Hi,
One simple way to keep people out is something like:
if (!$SESSION["id"] || $SESSION["id"] == "") {
header ("Location: index.php");
}
That's a simple way to keep people out.
One thing you really should do is set register_globals to off in your php.ini file. If you're just using the $id variable, the user could potentially do a page.php?id=1 and get right in.
Also, you could check for a session to be equal to a specified value.
Might wanna do a search on PHP security also, this could open a whole new can of worms. I'm also not the foremost authority on security.
Hope that gets you started... Post more if you have anymore questions.
-Dan Joseph