That looks like it should increment. As long as you don't reset $counter to 0 on each call.
How are you saving the variable $counter?
3:21 pm on Jul 30, 2001 (gmt 0)
actually, that was my problem.
I was reseting it back to zero. Since I had it in a loop I was'nt paying attention to how it was working.
Thanks for the help
8:24 pm on Jul 30, 2001 (gmt 0)
Give this php a whirl: /* just make up a file called counter.txt with one line - "0" (no double quotes) */ <? $counter = file("counter.txt"); echo ("You are visitor number $counter!\n"); $newcount = ++$counter; // update counter.txt $file = fopen("counter.txt","w"); fwrite($file,"$newcount"); fclose($file); ?>