I'm working through the New Riders MySQL book and I get the following error
when running a php script, can someone help? Thanks, Matt - 

Parse error: parse error in c:\program files\apache
group\apache\htdocs\genesis\dump_info.php on line 25

Here's lines 25 - 

printf ("<TD>%s</TD>\n", htmlspecialchars ($row[$i]));

Here's the full code if that helps - 

# dump_names.php - dump Genesis info

include ("genesis.inc");

$title = "Genesis info list";
html_begin ($title, $title);

genesis_connect ()
        or die ("Cannot connect to server");
# issue query
$query = "SELECT collector_material, name, description, coating, size FROM
mp ORDER BY name";
$result = mysql_query ($query)
        or die ("Cannot execute query");

print ("<TABLE>\n");
# read results of query, then clean up
while ($row = mysql_fetch_row ($result))
        print ("<TR>\n);
        for ($i = 0; $i < mysql_num_fields ($result); $i++)
                # escape any special characters and print
                printf ("<TD>%s</TD>\n", htmlspecialchars ($row[$i]));
        print ("</TR>\n");
mysql_free_result ($result);
print ("</TABLE>\n");

html_end ();


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to