Posted on 2004-11-23
Not sure if this will be a function of PHP, MySQL or Dreamweaver but basically I need to know if I can do conditional formating on my PHP page based on the dynamic data that is diplayed.
I have a basic PHP page that returns dynamic data based on a parameter that is passed from a seperate form. I have built just a basic dynamic table in dreamweaver with a repeating section to display all the returned data. The data is returned like so:
Account Number Address Date Recall Rate Exit Rate
12345678 100 Main St 10/2/2004 10.20% 11.57%
23456789 101 Elm St 9/1/2003 8.50% 7.56%
And so on
This data is displayed in a dynamic table with visible borders for each cell etc.
I need to use some type of conditional formating to color code the background and or font color of the Recall Rate and Exit Rate cells based on the value that is returned.
For example I would like to have the background color of the cell be red if the rate is above 12.00%, Yellow if the rate is between 10.00% - 12.00%, Green if the rate is below 10.00%. Ideally I would like to color code the font and the background ( Light green background , Dark green font, Light Yellow background, Dark yellow font etc.) but at this point I would be happy with just one of the other!