Hello ,
I am stuck on this line of code
echo $hits[0];
i am trying to get it to echo into a text box as an integar. at the moment the code
<?php
$count_my_page = ("hitcounter.txt");
$hits = file($count_my_page);
$hits[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$hits[0]");
fclose($fp);
echo $hits[0];
?>
when run on
<?php
include ("counter.php");
?>
just gives me a number
I have been thinking along trying to get
<?php
include ("counter.php");
?><HTML><HEAD>
</HEAD><BODY><INPUT value="ehco $hits" name="Hit counter"></BODY></HTML>
to work ,
thanks.