I'm developing a flash game and there is a high scores table in it I'm working on.
I'd like to use a simple text file to read/write high scores with PHP.
The potential problem is that if there occurs multiple request to write to the file, the file/data might be corrupted. Is that right?
Should I lock the file while writing? If so what happens another user submits a score while the file is locked? How to solve this?
I hope the problem is clear enough.
I'll switch to a database if the problem I tried to explain really exists and the solution is complicated.