depends on what you plan to use. If you use MySQL to store the data, you would just get the ID of the MySQl table key. If you are using flat files, just use something like:
if(!($file = fopen("/some/path/to/file","a"))) {
print "can't open file";
} else {
$usercomment = $_POST["usercomment"];
fwrite($file, $usercomment);
}
fclose($file);
I think that's right.