Hi,
I have a very simple question about a page counter.
The code is extremely basic:
$update = 'UPDATE ' . $database . '.table SET totalviews = totalviews + 1 WHERE id = ' . $id;
mysql_query($update);
Further down the page, the number of total views is displayed. Hence, each time you refresh your page, the counter will increase by one.
Everything has worked fine until today... I notice that if I refresh the page the counter increases by one (as expected); however, occassionally it increases by values of 1-5...
So my question: what is actually causing this? It should just increase by one on each page refresh, but why is it sometimes increasing by 2-5 per refresh?
Hope that this made sense!
Cheers!