Left Quote    You have to THINK anyway, so why not think BIG?
- Donald Trump    
Right Quote
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply

        Viewing Topic: Questions regarding member system and members online today:
  This user is online  Guest
  Subject: "Questions regarding member system a..." Posted: @ 8:02 pm on Dec 16 2005   
I got the members system working completely, and it grabs all the information from a few tables in my invision power board forums, so you can login with your forum name and password. Here are my questions:

1) How can i grab the data from the cookie, I.e. If i have a table in my page header that says include (loginpanel.php ) or something, how can i make it say you are logged in as _______, with the option to logout ... OR ... if you arent logged in, show the login form?

2) regarding members online: No matter how many users are viewing my site, it still says only 1 is on instead of like 14. Why is this? I set up everything correctly and created the tables in the database, according to what you told me to name them.

Thanks in advance, hopefully someone can assist me!


    Viewed: 6,367 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Questions regarding member syst..." Posted: @ 6:59 am on Dec 17 2005    

Member #: 1
Rank: Admin. - (1,510)
Since: 02/06/05
Posts: 604
From: USA

users online - that script or code needs to appear on every page of your site that you want them to be recognized on. Therefore, its easier if you set up your site so that you have like a 'header.php' file or something that is included on each page. Then, all you have to do is put the users online code in the header file.

to display a username you should echo the session variable. Something like this:


if($_SESSION[' logged_in'] == 1) {
echo("Wel come, ".$_SESSI ON['username' ]."<BR >
<a href=' .com/logout.php '>Logout< ;/a>";
} else {
echo("Wel come, Guest <BR>
<a href=' .com/login.php '>Login</ a>";

-bs0d |

    Viewed: 6,358 Times | Reply to This | To top
Viewing Page: 1 of 1

1 |

You must be logged in to post on the forums. Login or Register

"" Copyright © 2002-2021; All rights lefted, all lefts righted.
Privacy Policy