php - How to grab users on the same page in a session and list them? -
on page created chat room works if you're signed forums. grabs session username who's on page , shows name when send chat. messages sent , stored , sent out via .txt file using ajax , processed php. no database (as of yet).
i'm wondering how can grab & list current users on page chatting? i'm not php bit complicated me.
my guess log username database, , whoever logged displayed... close?
try this
<?php session_start(); echo "<pre>"; print_r ($_session); echo "</pre>"; //echo single entry echo $_session['username']; ?>
foreach loop through ($_session) show session data..
foreach ($_session $key=>$val) echo $key." ".$val;
Comments
Post a Comment