Hockey Results Database
‘;
exit(‘
Error retrieving games from database!
‘.
‘Error: ‘ . mysql_error() . ‘
‘);
}
echo “
“;
$gamesplayed = 0;
while ($game = mysql_fetch_array($games)) {
$date = $game[‘gamedate’];
$location = $game[‘location’];
$opponent = htmlspecialchars($game[‘oppname’]);
$result = $game[‘result’];
$bgscore = $game[‘score1’];
$oppscore = $game[‘score2’];
$notes = $game[‘notes’];
$story = $game[‘gamestory’];
$goalsfor += $game[‘score1’];
$goalsagainst += $game[‘score2’];
$gamesplayed++;
$gameswon = $game[‘wins’];
echo “
\n”;echo “
\n”;
echo “
\n”;
echo “
\n”;
echo “
\n”;
echo “
\n”;
echo “
\n”;
echo “
\n”;
}
echo “
Date | Opponent | Location | Result | Score | Notes |
---|---|---|---|---|---|
$date | $opponent | $location | $result | $bgscore-$oppscore | $notes |
echo “

\n”;
echo “
\n”;
echo “
\n”;
echo “
\n”;
echo “
Games Played: $gamesplayed | ||
BGSU Goals: $goalsfor | ||
Opponent Goals: $goalsagainst |
\n”;
?>