samuel_1991 0 Junior Poster in Training

Hi, I need to create a login program where it reads / writes to that file.

It must first detect if the file present or not.

If yes, it should not overwrite this file, else, it will have to create a default configuration file containing Username,Password & User Group.

PS: It is an academic prototype only, where I cant afford to use actual database (Unless can in $0 cost & simple way). I could have just use a list of arraylist to do it, but whenever the program is close, these array values are lost too.

The button "Login"(btnLogin) must verify with this configuration file that if it match every details in the same line, else, it proceed to next line and if nothing matches fully, it shows an "invalid login attempted". Else, it will go to next form for the user to key in data1 and data2 (Both in decimal) which also captures the current date.

These data will write to another file where it will detect if the file exist first or not. If exist, it writes to new line containing data1,data2 and date data else, creates a new file containing data1,data2 and date data.

The reason for doing so is if the logged in is a supervisior group, it can enter the staff name (Username) in order to check their data1 and data2 are within range or not which is sort according to date.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.