Use the following PHP tutorial to help you create a hit tracker.
Insert Into Mysql Database
Code:
CREATE TABLE `mini_hits` (
`hits` int(10) NOT NULL default'0'
);
INSERT INTO `mini_hits` (hits) VALUES ('hits');
tonfig.php
Code:
<?php
$config = array(
//Mysql Settings
'dbHost' => 'localhost',
'dbName' => '',
'dbUser' => '',
'dbPass' => '',
);
?>
counter.php
Code:
<?php
include("config.php");
//Connect To Mysql
mysql_connect($config[dbHost],$config[dbUser],$config[dbPass]);
mysql_select_db($config[dbName]);
//Count Hits
$result = mysql_query("SELECT * FROM `mini_hits`");
$row = mysql_fetch_array($result);
$row[hits]++;
$update = mysql_query("UPDATE `mini_hits` SET `hits`='$row[hits]'");
echo "Total Hits: $row[hits]";
?>
Example Here
Brought To You By PHPMini