Hi,
I have a site where members can log in, and if they are logged in, they get access to various extra areas in the site. If you are not logged in, you cannot view the other pages...
Now, I'm trying to do a 'logout' button... I've se the button action to load up a page called 'logout.php'. As the first thing on this page, the following appears:
<?php
session_unset();
session_destroy();
?>
You can ONLY see the logout button if you are logged in... and I'm using sessions to log users in... WHY then, do I get this messgae when logout.php loads up...?
Warning: session_destroy(): Trying to destroy uninitialized session in (location)/logout.php on line 3
Any help would be greatly appreciated. Thanks.