gatekeeper script
Posted: Mon Feb 10, 2003 1:09 pm
Hello,
I have bits of my site that only can be viewed if members have logged in.
I use the following script at the top of each page to make sure they are logged in. The script appears to work fine, just wondered if i am doing it the best way and checking enough.
I have bits of my site that only can be viewed if members have logged in.
I use the following script at the top of each page to make sure they are logged in. The script appears to work fine, just wondered if i am doing it the best way and checking enough.
Code: Select all
<?php
session_start();
IF (!isset($_SESSION['username'])) {
echo "You are not logged in or session has expired";
exit;
}
?>