Is there anyone with the knowledge on how to Show online users with php??
i have seen in many sites,now i need someone who can explain to do it.
(if there are users who are online to be displayed)
Please explain how to get started))))
mrcniceguy
5
Posting Whiz in Training
Recommended Answers
Jump to PostWell, I'm not expert with PHP, but I would suggest creating an SQL table called onlineUsers or somthing like that. Then when users login a PHP script adds them to the table. When they logout, simply remove them from the list.
Something like:
<?php //Log the …
Jump to PostFeel free to PM me if you need any help!!!
Jump to PostOk then, try this:
<?php session_start(); if(session_is_registered('user')) { $user=$_SESSION['user']; $del="DELETE FROM online WHERE user='$user'"; $result=mysql_query($del); if($result==true) { echo "<h3>Member Offline</h3>\n"; } else { echo "<h3>Failed to Logoff</h3>\n"; } //Remove the Session Vars $_SESSION = array(); if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } session_destroy(); //include"index.php"; } else …
Jump to Postwow, nevermind...just saw how old this thread was...
Jump to Posthello
i need of help for my website.need of someone to change API code for a module
All 18 Replies
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
mrcniceguy
5
Posting Whiz in Training
FlashCreations
20
Posting Whiz
Shanti C
commented:
Good Helping....
+2
nikesh.yadav
4
Posting Whiz in Training
Will Gresham
81
Master Poster
mrcniceguy
5
Posting Whiz in Training
flynismo
0
Junior Poster
flynismo
0
Junior Poster
alessandro.guerrazzi.7
0
Newbie Poster
jasonsarino
0
Newbie Poster
alessandro.guerrazzi.7
0
Newbie Poster
pianoman112233
0
Newbie Poster
alessandro.guerrazzi.7
0
Newbie Poster
hydrian
0
Newbie Poster
almostbob
866
Retired: passive income ROCKS
ashkan_3
15
Newbie Poster
rproffitt
commented:
Start a new discussion. Some may not find your post buried here.
+15
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.