rather then using a text file i would sugest using a ini file or a hash table for storing data in the way you are doing