here is a portion of the code and I get that it can not parse the line that mysql_fild_name is on, it tells me there is a , or ; expected
for ($i = 0; $i<$num_cols; $i++) { echo "<th>" . mysql_field_name ($result, $i) . "</th>\n"; }
there is no space in the function call. you have this:
mysql_field_name ($result, $i)
and it should look like this:
mysql_field_name($result, $i)
I tried that, it still does not work, tells me it expects a ' or ;
did you try taking the space out of your for statement too? it should look like this:
for($i = 0; $i<$num_cols; $i++) { echo "<th>" . mysql_field_name($result, $i) . "</th>\n"; }