Hi, ok here is the deal. I have a simple PHP counter here, that adds 1 hit to a # in a .txt file everytime someone views the site.
<?php
//First create a file to store the hits. Make sure this file has write permission
$counternum = "counternum.txt";
//Open the file and write the current hits plus one.
function displayCounter($counternum) {
$fp = fopen($counternum,rw);
$num = fgets($fp,9999);
fclose($fp);
$fp = fopen($counternum,w);
$num += 1;
fputs($fp, $num);
fclose($fp);
}
//Display the Current Hits
displayCounter($counternum);
?>
That works perfect, the only thing is that in the txt file it prints the # and only the number. I need it to print into the .txt file "hits="
So it would look like this for example, hits=1234 or hits=4321
Thanks a bunch fellas