I'm working on a text file mini-cms but I'm stopped at the add and delete entry part of the app. I store all the items in a pipe delimited text file, like so:
3|frank
2|annie
1|john
So when I want to add an entry (via a form), I need it to dynamically generate a new, unique id for the new entry, without conflicting due to missing lines. Should I rewrite all the values of the first column (id) to reflect the new ideas or start another text file and increment it, or..??
Any suggestions on how to best do this would be great. (examples would be helpful)
Thanks in advance,
Rob