[thelist] specifying table *column* colors in php

Marek Kilimajer kilimajer at webglobe.sk
Sat Nov 1 03:17:43 CST 2003


Roger Harness wrote:
> 'Volters,
> 
> I'm pulling some records out of a simple database table using PHP/MySQL and
> throwing them into an HTML table. I'm able to specify what field I'm sorting
> by by using:
> <.a href='?sort=lname'>last name<./a>
> and a simle while loop with mysql_fetch_row,
> then printing it out with:
> <.td>$fname<./td><.td>$lname<./td><.td>$email<./td> etc.
> 
> Works perfect for me.
> 
> But I'm wondering if there's any fairly simple way of specifying a
> background color for the column i'm sorting on? You know, like if its sorted
> on $fname, let it dynamically look like:
> <.td bgcolor='#00FF00'>$fname<./td>

This would work, but <col> and <colgroup> is more appropropriate for this.

> 
> I've googled, but only been able to find tutorials/tips on specifying colors
> for rows, not columns.
> 
> As always folks, TIA!
> 
> -Roger Harness
> 
> Ok...sort of off-topic tip, and most photoshop junkies probably already know
> about it, but:
> 
> <tip>
> If you do alot of cropping in photoshop, check out the "Trim" command. With
> different options, it can strip away un-needed areas of your canvas, MUCH
> quicker/easier then the "Crop" tool. Works great if you've applied drop
> shadows/etc too! No more zooming in at 1600 times to make sure you're not
> cutting into your image/shadow/etc with your marquee/crop tool.
> </tip
> 



More information about the thelist mailing list