user input not saving to file
hi guys, so i created 2 text file where my user and staff data respectively can be stored but my data doesn't get stored but the code is running perfectly. This is my code FILE *usr; FILE *staf; usr = fopen("users.txt","a+"); staf = fopen("staff.txt","a+"); // some data to be collected if (choice == 's') { fscanf(staf,"staffs: %d/%d/%d %s %s %s %s %s %d %s\n ",&add.month,&add.day,&add.year,add.name,choice,add.staff.username,add.password,add.email,&add.number); fprintf(staf,"staffs: %d/%d/%d %s %s %s %s %s %d %s\n ",&add.month,&add.day,&add.year,add.name,choice,add.staff.username,add.password,add.email,&add.number); fclose(staf); } else if (choice == 'u') { fscanf(usr," %d/%d/%d %s %s %s %s %s %d %s\n ",&add.month,&add.day,&add.year,add.name,choice,add.user.username,add.password,add.email,&add.number); fprintf(usr," %d/%d/%d %s %s %s %s %s %d %s\n",&add.month,&add.day,&add.year,add.name,choice,add.user.username,add.password,add.email,&add.number); fclose(usr); } else { goto personnel; }