In addition I wish to incorporate a table into the loop, a table that is as follows:
<table cellpading="1" id="con">
<tr>
<td width="410" bgcolor="#FFF8F8">$data->anime<td>
<td width="60" bgcolor="#FFF8F8"><center>$data->series</center></td>
<td width="50" bgcolor="#FFF8F8"><b><center>$data->rating</center></b></td>
</tr>
</table>
This of course I want to be found (where it says HERE):
$query = @mysql_query("SELECT * FROM animegenre WHERE id = '$id' ORDER BY title");
if (!$query) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>" );
exit();
}
while ($data = @mysql_fetch_object($query)) {
echo "HERE"
}
I came up with something like this:
$query = @mysql_query("SELECT * FROM animegenre WHERE id = '$id' ORDER BY title");
if (!$query) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>" );
exit();
}
while ($data = @mysql_fetch_object($query)) {
echo "<table cellpading=\"1\" id=\"con\">\n";
echo "<tr>\n";
echo "<td width=\"410\" bgcolor=\"#FFF8F8\">\n"
echo $data->anime;
echo "<td>\n";
echo "<td width=\"60\" bgcolor=\"#FFF8F8\"><center>\n";
echo $data->series;
echo "</center></td>\n";
echo "<td width=\"50\" bgcolor=\"#FFF8F8\"><b><center>\n";
echo $data->rating;
echo "</center></b></td>\n";
echo "</tr>\n";
echo "</table>\n";
}
Although I know I am doing something completely wrong (I am still extremely new to php).
Note: I receive the following error:
Parse error: parse error, expecting ','' or';'' in /home/virtual/site15/fst/var/www/html/anime/animegenre.php on line 40
(Line 40 is the line where the $data->anime is located).
--- ALSO ---
I do not expect anyone to write the code for me, so if it's a more complicated problem perhaps a link to a site that better explains how to use HTML within PHP code would be very helpful. Thanks in advance for your time.