As you can see from this page: http://www.cornwallfantasyhockey.com/cfhl/schedule3/
I have created an output table of 11 players. I would now like to total the GP and PTS column.
Here is what I have so far: any thoughts?
<?php
$result = mysql_query("SELECT * FROM stats1011 where 1A = 'BULL' OR 1B = 'BULL' order by field(pos,'LW','C','RW','D','G'), Last ASC")
or die(mysql_error());
?>
<?php
echo "<table width='150' border='1' cellspacing='0' cellpadding='1' bgcolor='ffffff'>";
echo "<tr>
<tr bgcolor='000000'>
<td align='center'colspan='5'><img src='/images/bar_bull.jpg' width='150' height='19' border='0'></td>
</tr>
<tr>
<td colspan='3' align='left' width='100' bgcolor='000000'><font face='arial' size='1' color='ffffff'><b>Player</b></td>
<td align='center' bgcolor='000000'><font face='arial' size='1' color='ffffff'><b>GP</b></td>
<td align='center' bgcolor='000000'><font face='arial' size='1' color='ffffff'><b>PTS</b></td>
</tr>
";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td width='15' align='center' bgcolor='FFFF99'><font face='arial' size='1' color='000000'><b>";
echo $row['Pos'];
echo "</b></td><td width='100' align='left' bgcolor='ffffff' align='center'><font face='arial' size='1' color='000000'>";
echo $row['Last'];
echo "</td><td width='15' align='center' bgcolor='ffffff' align='center'><font face='arial' size='1' color='000000'>";
echo $row['Team'];
echo "</td><td width='15' align='center' bgcolor='ffffff' align='center'><font face='arial' size='1' color='000000'>";
echo $row['GP1011_wk1'];
echo "</td><td width='15' align='center' bgcolor='ffffff' align='center'><font face='arial' size='1' color='000000'>";
echo $row['PTS1011_wk1'];
}
echo "<tr><td colspan='3' align='left' width='100' bgcolor='000000'><font face='arial' size='1' color='ffffff'><b>TOTALS</b></td>";
echo "<td align='center' width='100' bgcolor='000000'><font face='arial' size='1' color='ffffff'>";
echo $sum['GP1011_wk1'];
echo "</td><td align='center' width='100' bgcolor='000000'><font face='arial' size='1' color='ffffff'>";
echo $sum['PTS1011_wk1'];
echo "</td></table>";
?>