I'm trying to make one little prototype on PHP and Wordpress, and I can't find out what is wrong with this.
This code is fine:
<?php
mysql_connect( "localhost", "root");
mysql_select_db( "wp");
$result = mysql_query("select score from test");
$argument = mysql_query("select level from test");
echo "<table>\n";
echo "<tfoot><tr>\n";
while ($myarg = mysql_fetch_row($argument))
{
printf("<th>%s</th>\n", $myarg[0]);
}
echo "</tr></tfoot>\n";
echo "<tbody><tr>\n";
while ($myres = mysql_fetch_row($result))
{
printf("<td>%s</td>\n", $myres[0]);
}
echo "</tr></tbody>\n";
echo "</table>\n";
?>
But when I add selector to table, like this:
echo "<table id="data">\n";
I've got the following error on the page:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in ... ...
Same thing when I add styles.