Help!

php code to have text turn red if taxes are delinquent

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Web Developers RSS
Next:  McCain Lies......  
Author Message
tabell



Joined: Aug 04, 2008
Posts: 2



PostPosted: Mon Aug 04, 2008 3:36 pm    Post subject: php code to have text turn red if taxes are delinquent

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>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Web Developers All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum