Code: Select all
CREATE TABLE `counter` ( `counter` INT( 20 ) NOT NULL );
INSERT INTO counter VALUES (0);
Code: Select all
// Connects to your Database
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error());
mysql_select_db("Database_Name") or die(mysql_error());
Code: Select all
mysql_query("UPDATE counter SET counter = counter + 1");Code: Select all
$count = mysql_fetch_row(mysql_query("SELECT counter FROM counter"));Code: Select all
echo $countGoogle seems to be able to do more with their hit counter, can I expand on this crude design, how about a row for unique hits