i am actually working for showing online for loged in user. This is my code:
$qt="select userid from plus_login where tm > '$tm' and status='ON'";
$result = mysql_query($qt);
while($row=mysql_fetch_array($result))
{
$uid = $row['userid'];
$qt1="select first_name, last_name from signup where user_id='$uid'";
$result1 = mysql_query($qt1);
while($rows=mysql_fetch_array($result1))
{
$_SESSION['name']=$rows[0]." ".$rows[1];
echo $_SESSION['name']."<br>";
}
}
This above code is working but i want all $_SESSION['name'] which is in loop and displaying different values fetched from database to be shown in another pages. When i echo $_SESSION['name'] in another, it shows only one value. I think i need to store all value that is fetched from database in array form. How can i do it. Please help me. Thanks in advance.