title: Mysql Pageviews update only per session
body: <p>just got help with making my code for pageviews work... and now i would like the pageviews only count 1 for each session / ip. </p>
  
  <p>In my <strong>users</strong> (news.users) table i have these cells available for use: (tried to set up something earlier that didnt work out so these are not in use)</p>
  
  <pre><code>ip_reg, ip_visit, dtreg, dtvisit, visits, pass
  </code></pre>
  
  <p>The code i have that is now working looks like this :</p>
  
  <pre><code>//Adds one to the counter 
  
    mysql_query("UPDATE news SET posts = posts + 1, published=published, last_edit=last_edit WHERE id=$id");
  
  //Retreives the current count 
  $count = mysql_fetch_row(mysql_query("SELECT posts FROM news WHERE id=$id"));
  //Displays the count on your site print 
  
  
  echo "&lt;label&gt;Viewed: ";
  echo $count[0];
  echo " times&lt;/label&gt;";
  
  ?&gt; 
  </code></pre>
  
  <p>Can i use some of the unused cells in users to stop a user from reloading the page to get higher views on a page?  And how do i do it :P</p>