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?
circuitjump
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
toadhall
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[0]!\n"); $newcount = ++$counter[0]; // update counter.txt $file = fopen("counter.txt","w"); fwrite($file,"$newcount"); fclose($file); ?>