PeterJS
06-06-2004, 01:54 PM
I made a PHP code to record the most users online ever, and out put it to a page with the date.
How it works:
We use a remotely host free forum from ProBoards, so we have had to work out our own way to get the data to the php script. It works by having a hidden field, when the page loads it stores the amount of people online in the field and then submits the form to a hidden iframe. Works well, but for some reason, one moment it tells me that the most online was 38, then I notice it's dropped down to a lower number.
Before the value get's put into the MySQL database it checks to see if the new value is lower then the old value that's in the database, I don't understand how it could still enter a lower value into the database.
i'm just using something like........
$result = mysql_query("SELECT * FROM mostonline LIMIT 0 , 1");
while($row = mysql_fetch_object($result)){
$oldVal = $row->online;
$oldDate = $row->date;
}
if($total < $oldVal){
code
}
Hope someone can offer some help
Thanks
How it works:
We use a remotely host free forum from ProBoards, so we have had to work out our own way to get the data to the php script. It works by having a hidden field, when the page loads it stores the amount of people online in the field and then submits the form to a hidden iframe. Works well, but for some reason, one moment it tells me that the most online was 38, then I notice it's dropped down to a lower number.
Before the value get's put into the MySQL database it checks to see if the new value is lower then the old value that's in the database, I don't understand how it could still enter a lower value into the database.
i'm just using something like........
$result = mysql_query("SELECT * FROM mostonline LIMIT 0 , 1");
while($row = mysql_fetch_object($result)){
$oldVal = $row->online;
$oldDate = $row->date;
}
if($total < $oldVal){
code
}
Hope someone can offer some help
Thanks