It's because fgets stores the newline character so when strstr does a comparison it fails. From the main page: fgets() reads in at most one...
Separate names with a comma.