I am have my users go to a log in box on the site ( not in the news )
** using the login box plugin
I also have this script to show that they are logged in when browsing the site:
- Code: Select all
<div id="logged-in"><small style="font-size:15px">
<?PHP if($is_logged_in){
echo $user_avatar[$member['username']];
} ?>
<?PHP if($is_logged_in){
echo 'Hello <b><a href="http://www.website.com/admin/index.php?mod=personal">'.($username ? $username : (cookie ? $_COOKIE['login_username'] : $_SESSION['login_username'])).'</a></b> | <a href="http://www.website.com/admin/logout.php?action=logout">Log out.</a>';
}
else{
echo '<a href="http://www.website.com/login.php">log in</a> | <a href="http://www.website.com/registration.php">register</a>';
} ?></small>
</div>
The problem is when or if they do log in from the /admin/ area *CNR news section* then they go back and browse the website, it isn't remembering them --- some sort of session and or cookie is lost from the CNR/admin/index.php log in page to the regular front end of the website....?
I was also having problems with the logout too.. If you see above, I have them logging out through the admin CNR page, that I pretty much just did a save as index.php page and changed some design aspects...
What code in the index.php do I need in these other pages to remember the session and going back and forth to the NEWS section and the regular website... >????
The code I include should recognize if I user is logged in through the website log in box -- which it does a great job at it, but going back and forth it isn't remembering the session....
need some help.
thanks dudes.

