Morty222
02-13-2007, 09:39 PM
I am trying to alternate the TR color, can someone take a look and write something I can use to alternate the TR color. I have tried everything, no luck.
Here is my query:
$query = "select * from tl_tourny ORDER BY sdate ASC";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$id = $row['id'];
$name = $row['name'];
$games = $row['games'];
$location = $row['location'];
$cost = $row['cost'];
$sdate = $row['sdate'];
$edate = $row['edate'];
$age = $row['age'];
$age2 = $row['age2'];
?>
<tr>
<td class="tournytextlite"><?php echo $sdate; ?></td>
<td class="tournytextlite"><?php echo $edate; ?></td>
<td class="tournytextlite"><?php echo $location; ?></td>
<td class="tournytextlite"><a href="details.php?id=<?php echo $id; ?>"><?php echo $name; ?></a></td>
<td class="tournytextlite"><?php echo $age; ?> <?php echo $age2; ?></td>
<td class="tournytextlite">$<?php echo $cost; ?></td>
<td class="tournytextlite"><?php echo $games; ?></td>
<td class="tournytextlite"><a href="tournament_reg<?php echo $age; ?>.php">Register</a></td>
</tr><?php } ?>
Here is my query:
$query = "select * from tl_tourny ORDER BY sdate ASC";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
$id = $row['id'];
$name = $row['name'];
$games = $row['games'];
$location = $row['location'];
$cost = $row['cost'];
$sdate = $row['sdate'];
$edate = $row['edate'];
$age = $row['age'];
$age2 = $row['age2'];
?>
<tr>
<td class="tournytextlite"><?php echo $sdate; ?></td>
<td class="tournytextlite"><?php echo $edate; ?></td>
<td class="tournytextlite"><?php echo $location; ?></td>
<td class="tournytextlite"><a href="details.php?id=<?php echo $id; ?>"><?php echo $name; ?></a></td>
<td class="tournytextlite"><?php echo $age; ?> <?php echo $age2; ?></td>
<td class="tournytextlite">$<?php echo $cost; ?></td>
<td class="tournytextlite"><?php echo $games; ?></td>
<td class="tournytextlite"><a href="tournament_reg<?php echo $age; ?>.php">Register</a></td>
</tr><?php } ?>