ok, this is how I created the tabled needed for my HitCounter HACK:
$DB_site->query("CREATE TABLE hitcounter (counter MEDIUMINT (8) UNSIGNED DEFAULT '0' not null)");
Here is the code/hack:
--->modifications for Index.php
The following code is placed right after the
require("global.php3");
//hit counter hack
$hitcounter=$DB_site->query("SELECT hitcounter.counter
FROM hitcounter");
$value=$DB_site->fetch_array($hitcounter);
$hitcountervalue = $value[counter];
//END hit counter hack
...
...
...
The following line is placed right after
if ($action=="showforums") {
$DB_site->query("UPDATE hitcounter SET hitcounter.counter = hitcounter.counter + 1");
...
...
...
The End
There is the code you asked for....This is driving me crazy. It makes no sense why this is happeneing.
Like I said before, when I put the same code in a seperate php file (test.php), it works fine.
I only have this problem when the code is placed in index.php
|