<center>
<?php
$lasttime = $_SERVER['REQUEST_TIME'] - 3600*24*30; // 1 month
Calling to database?
$q = $db->query('SELECT * from votes where lasttime > '.$lasttime);
if($q->num_rows>0)
{
$users = array();
while($r = $q->fetch_object())
{
$users[$r->username] += 1;
}
if(!empty($users))
{
foreach($users as $user => $t)
{
echo"<br /><strong>$user</strong> has voted $t times";
}
}
If no votes no vote logs.
}else{
echo"NO VOTE LOGS YET";
}
?>
</center>
From what I understand it cant log in to the MYSQL Database? And im not really sure how to do that. Thanks!