With a registration page you wouldn't want them not to be able to register? Just prevent them from going to private pages by adding something like the following to those pages.
PHP Code:
<?php
// First execute a common code to connect to the database and start the session
require("includes/common.php");
// At the top of the page check to see whether the user is logged in or not
if(empty($_SESSION['user']))
{
// If they are not, redirect them to the login page.
header("Location: login.php");
// Remember that this die statement is absolutely critical. Without it,
// people can view your members-only content without logging in.
die("Redirecting to login.php");
}
Bookmarks