I am writing an expenses claim system on ourt local intranet
The data for each person logging a claim is going to stored in csv formatted file (1 file per user)
What would be the best way to generate unique sequential claim id numbers?
so far i am using
date("Ymd");
to generate a backwards date where the last number will change more often. However this doesnt solve a problem if more than one are submitted on the same day and bythe same person
Would it be more efficient to incorporate time into this aswell?? or is there a easier/better way. I had considered session id but this would 'cock up' when i person adds several claims in one day.
I had thought about just incrementing a sequential number but that could possibly mean opening,writing and closing a file many times
Does anyone have an idea???? The main problem would come when the administrator wants to view all or parts of submitted claims.
Thanx in advance
Regards
Edward Przeniczny