status indicator

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stevengoh
Forum Newbie
Posts: 5
Joined: Tue Nov 06, 2007 3:23 pm

status indicator

Post by stevengoh »

good day

Can any one teach me how to code a php sql code for status indicator. Once the person log in, it will show him online.

thank
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: status indicator

Post by aceconcepts »

Set a session var (loggedIn) dependent upon the sql result.

Then...

Code: Select all

 
if(isset($_SESSION['loggedin']) && $_SESSION['loggedIn']==1)
{
   echo'You are logged in!';
}
 
Post Reply