I keep getting Unexpected $ on the last line of my script and can
not for the life of me figure it out...
Can anyone see my goof?
<?php
include("board/db/mysql.php");
$dbname = "Database name";
$dbuser = "Database username";
$dbpw = "Database password";
$dbhost = "localhost";
$db = new dbstuff;
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Austin Metro Baseball League - Scores Editing Page</title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" margin="0"
onload="document.Storegame.homescore.focus();">
<form action="storegame.php" method="post" name="Storegame">
<table cellpadding="0" cellspacing="0" width="700" border="1" bordercolor="black">
<tr>
<td align="center">GameNo</td>
<td align="center">GameDate</td>
<td align="center">GameTime</td>
<td align="center">Visitor</td>
<td align="center">VisitorScore</td>
<td align="center">Home</td>
<td align="center">HomeScore</td>
<td align="center">Field</td>
</tr>
<?
if (!$teamid) {
//Show bad Team ID page.
} else{
$query = $db->query("select g.*, f.field_name from games g, _fields f where (homescore is null and visitorscore is null) and ((homeid = $teamid) or (visitorid = $teamid)) and (gamedate < NOW()) and f.id = g.fieldid order by gamedate desc LIMIT 5");
while (list($gameno, $gmdate, $gametime, $hometeam, $homescore, $visitteam, $visitscore, $field_name)=$db->fetch_row($query))
{
echo '<tr>';
echo ' <td valign="top" align="right" width="25">';
echo $gameno;
echo ' </td>';
echo ' <td valign="top" align="center" width="31">';
echo $gmdate;
echo ' </td>';
echo ' <td valign="top" align="right" width="40">';
echo $gametime;
echo ' </td>';
echo ' <td valign="top" align="center" width="60">';
echo $hometeam;
echo ' </td>';
echo ' <td valign="top" align="center" width="20">';
echo ' <input size="2" type="text" name="homescore" value="'.$homescore.'">';
echo ' </td>';
echo ' <td valign="top" align="center" width="60">';
echo $visitteam;
echo ' </td>';
echo ' <td valign="top" align="center" width="20">';
echo ' <input size="2" type="text" name="visitorscore" value="'.$visitscore.'">';
echo ' </td>';
echo ' <td valign="top" align="center" width="63">';
echo $field_name;
echo ' </td>';
echo '</tr>';
}
echo ' <tr>';
echo ' <td align="center" colspan="10">';
echo ' <input type="submit" name="gamesubmit" value="Submit" width="35" height="20">';
echo ' </td>';
echo ' </tr>';
echo '</table>';
echo '</form>';
mysql_free_result ($query);
?>
</body>
</html> <!-- Error occurs on this line -->