page view count increaes by two each time its loaded
Here is my php code:
@mysql_query("UPDATE mp3 SET views = views+1 WHERE id = '".mysql_real_escape_string($id)."'");
I have that in my header with some other PHP, every time I load the page, the view count goes up by 2 instead of one, what would be the 开发者_如何转开发cause of this? I checked the script over and everything looks fine. Thank you.
Check your CSS file or section for a URL background that is empty. That is the most common quirk that produces a double-retrieval.
Failing that, have a look in Firefox-Firebug / Chrome developer tools or something similar for which part of the code is causing the page to be loaded twice each time
精彩评论