By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,820 Members | 1,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,820 IT Pros & Developers. It's quick & easy.

strange problem with netscape, opera and pageviews

P: n/a
i'm trying to count pageviews on my website. this is part of the code
included in each page:
$query = mysql_query("SELECT * FROM pageviews WHERE datei =

if(mysql_num_rows($query) != 0)
$query = mysql_query("UPDATE pageviews SET hits = hits + 1 WHERE
datei = '$datei'");
$query = mysql_query("INSERT INTO pageviews SET datei = '$datei',
hits = '1'");

the "hits" field in the database is incremented every time a page gets
hit. this works fine with IE and mozilla firefox, but NN and opera
count a page twice when you load for the first time. i figure that
somehow a reload is triggered, but i don't know how.

the page contains javascript also, but even without it it counts

anyone any ideas??

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.