Re: task Scheduler driving me crazy!

From: Date: Tue, 03 Jul 2007 17:18:05 +0000
Subject: Re: task Scheduler driving me crazy!
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-258156@lists.php.net to get a copy of this message
On Jul 3, 2007, at 12:46 PM, Jochem Maas wrote:
Robert Cummings wrote:
On Tue, 2007-07-03 at 17:57 +0200, Jochem Maas wrote:
Robert Cummings wrote: ...
I'll add the CSS once I can get the form to work properly, and can figure out how to change the color with css based on a certain value stored in a database IE: $rowColor :)
At it's simplest:
    '<td class="'.$rowColor.'">'
... if $rowColor is a hex based value using it as a CSS class is not really going to work that well, in such cases I would opt to use inline css: echo '<td style="background:', $rowColor, '">';
Inline CSS is as maintainable as bgcolor. if you're using inline styling then you've missed the point.
$rowColor is coming from a DB (that was my assuption based on the OP's story) - it's value is, for example, '#ff0000' so it cannot be used as a CSS class .. the OP may not be in a position to change the data in the DB. There may be a style/color choosing interface in his app that makes things very maintainable (especially for the developer because the user does the work). missing the point is not all bad - especially when the point is on the end of a sword :-)
Allow me to clear up one thing :) $rowColor does not come from a database, if($row[5] =='Level1' or $row[5] =='level1'or $row[5] =='level 1'or $row[5] =='Level 1'){ // Yellow Highlight $rowColor = $Level1; Currently $Level1 is hardcoded into the php file and provides color information based on $row[5] which does come from the database :) And I do have full control over the info in the database. It's a internal project to make us more of a paperless office. Oh, And I do have a check box on the form, just 1 per row, use it to be able to check it when the project is done. And for anyone that is interested: HTTP://www.raoset.com/tests/ticklers/viewall.php <------ That's the output of the form :) Please don't abuse it! :)

« previous php.general (#258156) next »