I haven't really looked at why this is happening, but just change your query (much easier) to
PHP Code:
$get = mysql_query("SELECT font FROM table WHERE id = '".$id."'");
while($row = mysql_fetch_array($get)){
$font = 'fonts/'.$row['font'];
}
mysql_query("UPDATE table SET hits = hits+1 WHERE id = '".$id."'");
Why still use the mysql set of functions? you really should be using either mysqli or PDO even php.net suggest this as to they have plans on taking the mysql set of functions out completely in the near future or rather making them depreciated
When I click the link, it opens in my browser (as expected). If I then click refresh over and over, it goes up only 1 each time I click refresh. As far as I can tell that means its functioning properly.
Oh firefox, why do you do some strange things that no one ever expects. I just thought of 3 ways to prevent this, and loopholes in each theory. I wonder if its just going to the file directly. Can you try putting the url in the src of an img tag, and see if it still requests twice? If not then there's no reason to worry, otherwise the counter will just be inaccurate.
Bookmarks