[RESOLVED] Help fixing Parse error: parse error
could any on telll me what i am doing wrong i keep getting this error:
Parse error: parse error
pointing at :
echo("<meta http-equiv="refresh" content="60"> ");
PHP Code:
<?
require("util.php");
$sql = new MySQL_class;
$sql->Create("color");
#
# Selecting Multiple Rows
#
echo("<html>");
echo("<head>");
[B]echo("<meta http-equiv="refresh" content="60"> ");[/B]
#echo("<h3>Log History</h3>\n");
echo("<p><ul><table border=1 cellpadding=4>\n");
echo("<tr><th>Name</th> > <th> color </th> <th> color2</th> </tr>\n");
$sql->Query("Select Name,color,color2 from NameColor");
for ($i = 0; $i < $sql->rows; $i++) {
$sql->Fetch($i);
$Name = $sql->data[0];
$color = $sql->data[1];
$color2 = $sql->data[2];
#echo("<tr><td>$Name</td> <td>$color</td> \n");
#echo("<tr><td><font color="#FF00FF">$Name</font></td> <td>$color</td> \n");
echo "<tr><td>" .$Name ." </td> <td>$color</td> <td style='color2:". $color2 ."' >" . $color2 . " </td> \n";
#echo "<tr><td style='color2:" . $color2 . ";'>" .$Name ." </td> <td>$color</td> \n";
}
echo("</table>\n");
echo("</body>");
echo("</html>");
?>
Re: Help fixing Parse error: parse error
http://www.vbforums.com/showpost.php...49&postcount=7
Most of your code doesn't need to be echoed out. PHP shouldn't be used to print out large amounts of HTML, its hard to read and prone to parsing errors like you are getting.
To prevent getting the error in the furture, you need to escape your " in a string, although for string values you really should be using literals ie '.
Re: Help fixing Parse error: parse error
I thought I remembered answering this one earlier :D