For reasons of scope, you may need to first use $count outside the braces. This would give you...
<? session_start(); $count = 0; if ( ! isset($_SESSION['been_here_before']) ) { $_SESSION['been_here_before']=TRUE; $fp=fopen("./counter.txt","r"); $count=fread($fp,5); fclose($fp); ++$count; $fp=fopen("./counter.txt","w"); fwrite($fp,$cnt); fclose($fp); } print "Visited: .$count.<BR>"; ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php