开发者

page view count increaes by two each time its loaded

开发者 https://www.devze.com 2023-02-09 07:59 出处:网络
Here is my php code: @mysql_query(\"UPDATE mp3 SET views = views+1 WHERE id = \'\".mysql_real_escape_string($id).\"\'\");

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

0

精彩评论

暂无评论...
验证码 换一张
取 消