Hi,
In this php tutorial you will learn the simple way to build a script which counts how many times a page is viewed. For this, we can use a mysql database table and a simple php script.
<?php $pagename = $_SERVER['PHP_SELF']; $sql = "select * from mysqltable where page = '$pagename'"; $rs = mysql_query($sql); if($rs) { $row=@mysql_fetch_object($rs); $counter = $row->counterfield; //update the stats, if they exits $counter = "".($counter+1).""; $qry = mysql_query("updated tablename set counterfield = '$counter' where id = '$row->id'"); }else{ print mysql_error(); } ?>