hi..im very new here..may i know how to 'Writing a Counter Script'
what i did is some thing like this on my php file:
<?php
require($_SERVER["DOCUMENT_ROOT"]."/config/db_config.php"
;
$connection = mysql_connect($db_host, $db_user, $db_password) or die("error connecting"
;
mysql_select_db($db_name, $connection);
$query = "SELECT * FROM counter";
$result = mysql_query($query, $connection) or die(mysql_error());
$views = mysql_result($result, "num_views"
;
$views++;
$query = "UPDATE counter SET num_views = $views";
mysql_query($query, $connection) or die(mysql_error());
echo "This page been views ".$views." times";
?>
**my problem is the counter view is still in '0' when i refresh/reload my browser..???
did any error in my php file..??
i all ready have a buzzDB database..
but from my browser still view a..
need help..??
============================================================================
OOOppss..sorry..i get it..
just restart my services..TQ all..!!
Post Edited (03-20-07 05:06)