Code:
<head>
<style type="text/css">
* {
margin:0;
padding:0;
}
#scoretable {
width: 400px;
padding: 0;
margin:0 0 20px 0;
}
#totaltable {
float:right;
width: 400px;
padding: 0;
margin:0 0 20px 0;
}
.clear {clear:right;}
th {
font: bold 10px Verdana, Arial, Times, Georgia, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
border-top: 1px solid #C1DAD7;
text-align: left;
padding: 6px 6px 6px 12px;
background-color:#CAE8EA;
}
th.center {
text-align:center;
}
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #C1DAD7;
background: none;
}
td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 5px 5px 5px 5px;
color: #4f6b72;
}
td.alt {
background: #F5FAFA;
color: #797268;
}
th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background-color:#f5fafa;
font: bold 8px Verdana, Arial, Times, Georgia, sans-serif;
text-align:center;
}
th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background-color:#fff;
font: bold 8px Verdana, Arial, Times, Georgia, sans-serif;
text-align:center;
color: #797268;
}
</style>
</head>
<body>
<?
$username="*******";
$password="*******";
$database="*******";
mysql_pconnect(localhost,$username,$password);
@mysql_select_db($database) or die(mysql_error());
$query="SELECT * FROM Scoring_Track";
$result=mysql_query($query)or die(mysql_error());
$num=mysql_numrows($result);
mysql_close();
?>
<table id="scoretable" cellspacing="0" summary="The Scoring Track">
<tr>
<th scope="col" colspan="2" abbr="Gaming Scores" class="nobg">Gaming Scores</th>
<th scope="col" colspan="2" abbr="Dylan" class="center">Dylan</th>
<th scope="col" colspan="2" abbr="James" class="center">James</th>
<th scope="col" colspan="2" abbr="Mark" class="center">Mark</th>
<th scope="col" colspan="2" abbr="Shaun" class="center">Shaun</th>
<th scope="col" colspan="2" abbr="Simon" class="center">Simon</th>
</tr>
<tr>
<th scope="row" class="spec">Date</th>
<th scope="row" class="spec">Game</th>
<th scope="row" class="spec">PPs</th>
<th scope="row" class="spec">VPs</th>
<th scope="row" class="spec">PPs</th>
<th scope="row" class="spec">VPs</th>
<th scope="row" class="spec">PPs</th>
<th scope="row" class="spec">VPs</th>
<th scope="row" class="spec">PPs</th>
<th scope="row" class="spec">VPs</th>
<th scope="row" class="spec">PPs</th>
<th scope="row" class="spec">VPs</th>
</tr>
<?
$i=0;
while ($i < $num) {
$date=mysql_result($result,$i,"date");
$game=mysql_result($result,$i,"game");
$dylanplayerp=mysql_result($result,$i,"dylanplayerp");
$dylanvictoryp=mysql_result($result,$i,"dylanvictoryp");
$dylantributep=mysql_result($result,$i,"dylantributep");
$jamesplayerp=mysql_result($result,$i,"jamesplayerp");
$jamesvictoryp=mysql_result($result,$i,"jamesvictoryp");
$jamestributep=mysql_result($result,$i,"jamestributep");
$markplayerp=mysql_result($result,$i,"markplayerp");
$markvictoryp=mysql_result($result,$i,"markvictoryp");
$marktributep=mysql_result($result,$i,"marktributep");
$shaunplayerp=mysql_result($result,$i,"shaunplayerp");
$shaunvictoryp=mysql_result($result,$i,"shaunvictoryp");
$shauntributep=mysql_result($result,$i,"shauntributep");
$simonplayerp=mysql_result($result,$i,"simonplayerp");
$simonvictoryp=mysql_result($result,$i,"simonvictoryp");
$simontributep=mysql_result($result,$i,"simontributep");
$dylanbadge=mysql_result($result,$i,"dylanbadge");
$jamesbadge=mysql_result($result,$i,"jamesbadge");
$markbadge=mysql_result($result,$i,"markbadge");
$shaunbadge=mysql_result($result,$i,"shaunbadge");
$simonbadge=mysql_result($result,$i,"simonbadge");
?>
<tr>
<th scope="row" class="specalt"><? echo $date; ?></th>
<th scope="row" class="specalt"><? echo $game; ?></th>
<th scope="row" class="specalt"><? echo $dylanplayerp; ?></th>
<th scope="row" class="specalt"><? echo $dylanvictoryp; ?></th>
<th scope="row" class="specalt"><? echo $jamesplayerp; ?></th>
<th scope="row" class="specalt"><? echo $jamesvictoryp; ?></th>
<th scope="row" class="specalt"><? echo $markplayerp; ?></th>
<th scope="row" class="specalt"><? echo $markvictoryp; ?></th>
<th scope="row" class="specalt"><? echo $shaunplayerp; ?></th>
<th scope="row" class="specalt"><? echo $shaunvictoryp; ?></th>
<th scope="row" class="specalt"><? echo $simonplayerp; ?></th>
<th scope="row" class="specalt"><? echo $simonvictoryp; ?></th>
</tr>
<?
$i++;
}
echo "</table>";
?>
<table id="totaltable" cellspacing="0" summary="The Total Points">
<tr>
<th scope="col" abbr="The Showdown" class="nobg">The Showdown</th>
<th scope="col" colspan="2" abbr="Dylan">Dylan</th>
<th scope="col" colspan="2" abbr="James">James</th>
<th scope="col" colspan="2" abbr="Mark">Mark</th>
<th scope="col" colspan="2" abbr="Shaun">Shaun</th>
<th scope="col" colspan="2" abbr="Simon">Simon</th>
</tr>
<tr>
<th scope="row" class="specalt"> </th>
<th scope="row" class="specalt">10</th>
<th scope="row" class="specalt">6</th>
<th scope="row" class="specalt">3</th>
<th scope="row" class="specalt">3</th>
<th scope="row" class="specalt">20</th>
<th scope="row" class="specalt">22</th>
<th scope="row" class="specalt">20</th>
<th scope="row" class="specalt">26</th>
<th scope="row" class="specalt">20</th>
<th scope="row" class="specalt">27</th>
</tr>
<tr>
<th scope="row" class="specalt">Total Points</th>
<th scope="row" colspan="2" class="specalt">16</th>
<th scope="row" colspan="2" class="specalt">6</th>
<th scope="row" colspan="2" class="specalt">42</th>
<th scope="row" colspan="2" class="specalt">46</th>
<th scope="row" colspan="2" class="specalt">47</th>
</tr>
</table>
<div class="clear"></div>
<?
mysql_free_result($result);
?>
</body>
Bookmarks