I am trying to print this line of code to the HTML file when my file reads the character "form". However, I keep failing and I have no idea how to do it. Please help
fgets(str,999,p);
while (!feof(p)) {
if (strstr("form", str) != NULL) {
printf("<input type=\"hidden\" name=\"gold\" value=\"%d\"", goldpieces);
}
printf("%s", str);
fgets(str,999,p);
}
fclose(p);
return 0;