well I never, a+ did the trick!
I spent hours trying get it to work and I knew I must be close.
I settled on the following bit of code since it's nice and simple and seem's to do the trick ie prints out the HTML table with a unique ID.
sorry I forgot code tags , didn't think that my ity bity snitch of code deserved code tags!
file mode rt also works!
thanks for all the help. Here's the piece of code I'm using.
(with code tags...I hope) It takes input from a form and enters it into a HTML table. It's very simple but I can work it up to what I really need with time and effort.
void process2(char *s)
int header_print =0;
int linecount =0 ;
FILE *r ;
r = fopen(datafile,"rt");
if(r == NULL)
printf("<P><EM>Unable to open data file</EM>");
if(inchar == '\n')
ID = linecount;
char b = "<TABLE> <TABLE BORDER >";
char d = "<TH> ID#";
char f = "<TH> LAST NAME";
char g = "<TH> FIRST NAME";
char h = "<TH> TEST 1 SCORE";
char i = "<TH> TEST 2 SCORE";
char c = "<TH> TEST 3 SCORE";
char j = "<TH> TEST 4 SCORE<TR>";
fprintf(r,"\n%s%s%s%s%s%s%s%s",b,d,g,f,h,i,c,j); // prints table headers
GetStringComponent("name_first", s, name_first);
GetStringComponent("name_last", s, name_last);
GetStringComponent("test1_score", s, test1_score);
//must execute once from here to print headers, ok then
fprintf(r, "\n<tr><td align=""center"" >%d<td>%s<td>%s<td><td>%s<tr>",ID,name_first,name_last,test1_score );
// doesn't work
hey, the tags worked.