Jump to content

usersonline


only one

Recommended Posts

code:

<?php

include("cons.php");

$date = date("Yjm");

$time = date("Gi");

mysql_query("UPDATE `clanusers` SET `time` = '$time', `date` = '$date' WHERE '$user' = `username`");

$info = mysql_query("SELECT * FROM clanusers");

while ($r = mysql_fetch_array($info)) {

$rank2 = $r['rank'];

$date1 = $r['date'];

$time1 = $r['time'];

$name = $r['username'];

$date2 = date("Yjm");

$time2 = $time1 + 0005;

$color2 = $r['color'];

if($date2==$date1){ if($time<$time2){

$info2 = mysql_query("SELECT rank FROM ranks WHERE `rankno` = '$rank2'");

while ($r2 = mysql_fetch_array($info2)) {

$rank3 = $r2['rank'];

echo "<b><a href='?page=Profile&userna=$name'><title='Rank: $rank3'><font face=\"Arial, Helvetica, sans-serif\" font size=\"1\" color=\"$color2\">$name</font></title></a> <font color=#cccccc face=Arial size=1>|</font> </b>"; }}}} mysql_error();

?>

 

doesnt show whos online for some reason, it works fine without the the ranks bit

Link to comment
https://forums.phpfreaks.com/topic/37769-usersonline/
Share on other sites

<?php
include("cons.php");
$date = date("Yjm");
$time = date("Gi");
mysql_query("UPDATE `clanusers` SET `time` = '$time', `date` = '$date' WHERE '$user' = `username`");
$info = mysql_query("SELECT * FROM clanusers");
while ($r = mysql_fetch_array($info)) {
$rank2 = $r['rank'];
$date1 = $r['date'];
$time1 = $r['time'];
$name = $r['username'];
$date2 = date("Yjm");
$time2 = $time1 + 0005;
$color2 = $r['color'];
if($date2==$date1){ if($time<$time2){
$info2 = mysql_query("SELECT rank FROM ranks WHERE `rankno` = '$rank2'");
while ($r2 = mysql_fetch_array($info2)) {
$rank3 = $r2['rank'];
echo "<a href='?page=Profile&userna=$name'><title='Rank: $rank3'><font face=\"Arial, Helvetica, sans-serif\" font size=\"1\" color=\"$color2\">$name</font></title>[/url] <font color=#cccccc face=Arial size=1>|</font> "; }}}} mysql_error(); 
?>

Link to comment
https://forums.phpfreaks.com/topic/37769-usersonline/#findComment-180668
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.