I am designing a site where user input will be written to a text file. In other words there is a very slight but possible chance that the file is open and being written to by one process as another process accesses it. But is this nothing to worry about as the OS will schedule those processes so that the file will always be closed before a process is alowed to write to it (this will be running on a UNIX server)?
You'll want to flock() the file first: with two simultaneous attempts to write to the file, one will lose out and complain. See the manual.
But your situation sounds like one you should use a database for.