Here is the code. I am trying to hi-lite rows that are generated that have a value of "Y" for column AA_letter_recd in yellow, the rows . The ones that have a value of "N" are not to be high-lited in yellow. Thanks.
<?php
/*Main Store Index */
// Script Error Reporting
error_reporting(E_ALL);
ini_set('display_errors', '1');
$db_host = "xxx";
$db_username = "xxx";
$db_pass = "xxx";
$db_name = "xxx";
mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect to mysql");
mysql_select_db("$db_name") or die ("no database exists");
// Run a select query to get my all (*) items from master list
//dynamic list is an empty string. depends on other factors
$examsdynamicList = "";
$sql = mysql_query("SELECT * FROM exams ORDER BY Exam_date");
$fileCount = mysql_num_rows($sql); // count the output amount
if ($filecount > 0) {
/*get all the matter details*/
while($row = mysql_fetch_array($sql)){
$id = $row["id"];
$File_no = $row["File_no"];
$EE_name = $row["EE_name"];
$Doctor = $row["Doctor"];
$Exam_date = $row["Exam_date"];
$Appointment_letter_date = $row["Appointment_letter_date"];
$Joint_letter_sent_date = $row["Joint_letter_sent_date"];
$Sent_to_doctor_date = $row["Sent_to_doctor_date"];
$Type = $row["Type"];
$Notes1 = $row["Notes1"];
$Notes2 = $row["Notes2"];
$Notes3 = $row["Notes3"];
$AA_letter_recd = $row["AA_letter_recd"];
if ($AA_letter_recd == "Y")
$examsdynamicList .= '
<tr style="background-color: Yellow;">
<td>' . $EE_name . '</td>
<td>' . $File_no . '</td>
<td>' . $Doctor . '</td>
<td>' . $Exam_date . '</td>
<td>' . $Appointment_letter_date . '</td>
<td>' . $Joint_letter_sent_date . '</td>
<td>' . $Sent_to_doctor_date . '</td>
<td>' . $Type . '</td>
<td>' . $Notes1 . '</td>
<td>' . $Notes2 . '</td>
<td>' . $Notes3 . '</td>
<td>' . $AA_letter_recd . '</td>
</tr>
';
if ($AA_letter_recd == "N")
$examsdynamicList .= '
<tr>
<td>' . $EE_name . '</td>
<td>' . $File_no . '</td>
<td>' . $Doctor . '</td>
<td>' . $Exam_date . '</td>
<td>' . $Appointment_letter_date . '</td>
<td>' . $Joint_letter_sent_date . '</td>
<td>' . $Sent_to_doctor_date . '</td>
<td>' . $Type . '</td>
<td>' . $Notes1 . '</td>
<td>' . $Notes2 . '</td>
<td>' . $Notes3 . '</td>
<td>' . $AA_letter_recd . '</td>
</tr>
';
}
} else {
$examsdynamicList = "Sorry! Master List is Unavailable. Please try again later.";
}
mysql_close();
?>