...по этой ссылке нашёл пару примеров:
<?php
#going to update last users counter script since
#aborting a write because a file is locked is not correct.
$counter_file = '/tmp/counter.txt';
clearstatcache();
ignore_user_abort(true); ## prevent refresh from aborting file operations and hosing file
if (file_exists($counter_file)) {
$fh = fopen($counter_file, 'r+');
while(1) {
if (flock($fh, LOCK_EX)) {
#$buffer = chop(fgets($fh, 2));
$buffer = chop(fread($fh, filesize($counter_file)));
$buffer++;
rewind($fh);
fwrite($fh, $buffer);
fflush($fh);
ftruncate($fh, ftell($fh));
flock($fh, LOCK_UN);
break;
}
}
}
else {
$fh = fopen($counter_file, 'w+');
fwrite($fh, "1");
$buffer="1";
}
fclose($fh);
print "Count is $buffer";
?>
и
<?
$counter_file = 'somefile.txt';
clearstatcache();
ignore_user_abort(true); ## prevent refresh from aborting file operations and hosing file
$fh = fopen($counter_file, 'r+b'); ## use 'r+b' so file can be read and written
if ($fh)
{
if (flock($fh, LOCK_EX)) ## don't do anything unless lock is successful
{
$count = fread($fh, filesize($counter_file));
rewind($fh);
$count++;
fwrite($fh, $count);
fflush($fh);
ftruncate($fh, ftell($fh)); ## better than truncating to 0 before writing, per 04-Mar-2003 comment below
flock($fh, LOCK_UN);
} else echo "Could not lock counter file '$counter_file'";
fclose($fh);
} else echo "Could not open counter file '$counter_file'";
ignore_user_abort(false); ## put things back to normal
echo "counter is at $count";
?>
---------
Но дело-то в чём - если б я в этом профи был...

возможно ли примеры вышепоказанного кода "прикрутить" к форме с кнопкой "Субмит". Точнее - конечно можно, но как ИМЕННО???
PS: Не удивляйтесь вы так, я же учусь
