Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

time issues

$
0
0

I am trying to show active users with in the last 5 mins.

<?php 
				error_reporting(E_ALL);
				include ("/home/jayden1/database_access/dblogincheck.php");
              $d=date('c',time()-5*60);//last 5 minutes
              		
              echo $d;
             $q=mysql_query("SELECT `username` FROM `navigate` WHERE `time` >= '$d'") or die ("query failed to find".mysql_error());
             echo $q;
             if(mysql_num_rows($q)>0){
	             print "<ul>";
	             echo $q;
	             while($users=mysql_fetch_array($q)){
	             	print "<li>{$users[0]}</li>";
	             	
	             }
	             print "</ul>";
	             echo $users;
             }
			?>

no errors just wont display. I know the time in my db updates every time a pages is loaded


Viewing all articles
Browse latest Browse all 13200

Trending Articles