Also don't forget that there's no guarantee the data written by fread doesn't have a null in it. So that's another reason that strlen is a bad way to figure out the buffer's length. (And to follow the above advice to use fread's return value).
Also don't forget that there's no guarantee the data written by fread doesn't have a null in it. So that's another reason that strlen is a bad way to figure out the buffer's length. (And to follow the above advice to use fread's return value).
Rather than arguing, try a web search: 'php login example' gives me several million(!) results.
And if you wish to simply print text with a newline in it, it's \n, not /n.
scanf is the input function in C. You'll want to ask the user for the size of the array, and then have a loop that reads their numbers. Do you know how to do a loop?
Assuming you're really wanting to find files that have a line beginning with that string, and not with any other characters in front of your SearcText, you might want to consider using strncmp, instead of strcmp. That will also cure your problem with any trailing text (such as a newline or a comment).