Click here to Skip to main content
16,018,797 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to change the font color of both rows if first item on row c race3 matches anyitem on row d race 3

I have tried with google and nothing I can find.



PHP
<?php
include 'dbc.php';
$result = mysql_query("SELECT `A`,`B`,`C`,`D`,`E`,`F`,`G`,`H`,`I`,`J`,`K`,`L`,`M`,`N`,`O`,`P`,`Q`,`R`,`S`,`T`,`U`,`V`,`W`,`X`,`Y` FROM Sheet1")or die (mysql_error()); 

$num = mysql_num_rows($result);
  

 echo "<table id=\"tfhover\" class=\"tftable\" style='text-align:center' border='1'>

<tr>
<th>A</th>
<th>B</th>
<th>C</th>
<th>D</th>
<th>E</th>
<th>F</th>
<th>G</th>
<th>H</th>
<th>I</th>
<th>J</th>
<th>K</th>
<th>L</th>
<th>M</th>
<th>N</th>
<th>O</th>
<th>P</th>
<th>Q</th>
<th>R</th>
<th>S</th>
<th>T</th>
<th>U</th>
<th>V</th>
<th>W</th>
<th>X</th>
<th>Y</th>

</tr>";
 
while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['A'] . "</td>";
  echo "<td>" . $row['B'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['C'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['D'] . "</FONT></td>";
  echo "<td>" . $row['E'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['F'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['G'] . "</FONT></td>";
  echo "<td>" . $row['H'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['I'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['J'] . "</FONT></td>";
  echo "<td>" . $row['K'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['L'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['M'] . "</FONT></td>";
  echo "<td>" . $row['N'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['O'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['P'] . "</FONT></td>";
  echo "<td>" . $row['Q'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['R'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['S'] . "</FONT></td>";
  echo "<td>" . $row['T'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['U'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['V'] . "</FONT></td>";
  echo "<td>" . $row['W'] . "</td>";
  echo "<td><FONT COLOR='FFFFFF'>" . $row['X'] . "</FONT></td>";
  echo "<td><FONT COLOR='FF0000'>" . $row['Y'] . "</FONT></td>";


  echo "</tr>";
  }
echo "</table>";
 
?>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> 
</html>
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900