We currently have an AS400 database that we use for all of our tax listings. We have a website that uses an ODBC connection so you can see the last 4 years of taxes. What we would like, is that if the "CURRENT DUE" is delinquent, to have the number turn red, if not, keep it blue text.
The 'dlqcd1' field is delinquent if it is set to "D". and the red text should show up on the 'tprdu1' field. I think we are close. If I have the top part set to if ($dlqcd1="D"){//true then delinquent (and non delinquent) fields turn red. if it's if ($dlqcd1=="D"){//true with 2 equals marks, then the fields are blue, either way. It just doesn't seem to be pulling the "D".
Here is our code. You can see where it's year 1,2,3 or 4 at the end of the field numbers.
<?php
if ($dlqcd1="D"){//true
$font_color="#FF0000"; //red
}else {
$font_color="Blue"; //black
}
?>
<TR>
<TD>CURRENT DUE</TD>
<TD ALIGN=CENTER style="color:<?php echo $font_color;?>"> <?php echo "$".number_format (odbc_result($result,'tprdu1'),2,'.',',') ?></strong></TD>
<TD ALIGN=CENTER><strong><?php echo "$".number_format (odbc_result($result,'tprdu2'),2,'.',',') ?></strong></TD>
<TD ALIGN=CENTER><strong><?php echo "$".number_format (odbc_result($result,'tprdu3'),2,'.',',') ?></strong></TD>
<TD ALIGN=CENTER><strong><?php echo "$".number_format (odbc_result($result,'tprdu4'),2,'.',',') ?></strong></TD>
</TR>