strange problem with netscape, opera and pageviews

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chotiwallah

    #1

    strange problem with netscape, opera and pageviews

    i'm trying to count pageviews on my website. this is part of the code
    included in each page:


    $query = mysql_query("SE LECT * FROM pageviews WHERE datei =
    '$datei'");

    if(mysql_num_ro ws($query) != 0)
    {
    $query = mysql_query("UP DATE pageviews SET hits = hits + 1 WHERE
    datei = '$datei'");
    }
    else
    {
    $query = mysql_query("IN SERT 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
    twice.

    anyone any ideas??

    micha
Working...