Any idea why this is not working... $file = fopen("Counter.txt", "r+");
$counter = fread($file, filesize("Counter.txt")); fwrite($file, "$counter", strlen($counter)); echo '<form name="studVer" action = "ThisSameFile.php" method="post">'; if(empty($SomeVariable...)){ $counter++; // Here counter indicates that it has been incremented... echo "counter = $counter"; // For some reason the updated value is not written // to Counter.txt fwrite($file, "$counter", strlen($counter)); fclose($file); // Again this indicates that the value of $counter // has actually gone up... echo "counter = $counter"; I submit here... The String in Counter.txt is always 0 why is this... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php