Okay, currently I have a script set up, that when you click the button, it will increase the number by one.. This works fine, but if there are too many clicks at once, it will reset back to 0, which is not good. I put a javascript thing so you can only click once per page load, but I want to take this off..
I will include my script, and what i want to know, is if there is a different way to do it.. MySQL perhaps (Need detailed instructions for this 😛)
This is the code for increasing the number by 1:
<?php
$counterfile = './county.txt';
$fcontents = file($counterfile);
$counter = $fcontents[0];
$counter++;
$fp = fopen($counterfile,'w');
fwrite($fp,$counter);
fclose($fp);
?>