Alright, so I installed this script that allows users to register to my site and gain access to their own profiles and member's only pages on my site.
The problem is:
When I put the code that makes the page members only on my page, if you aren't logged in, it asks you to. But even after someone logs in, it still asks them to log in.
But that doesn't happen in the directory of the log in page.
Alright, so, the log in page is in the directory "/members" of my site. So is the user's profile page.
When you go to the profile page not logged in, it asks you to log in. If you do, then the profile page shows your profile.
But any page not in the "/members" directory doesn't work with the code.
Here's the code to make a page member's only.
<?php
$username = $_COOKIE['loggedin'];
if (!isset($_COOKIE['loggedin'])) die("You are not logged in, <a href='/members/login.html'>click here</a> to login.");
echo "You are logged in as <strong>$username</strong>";
?>