Re: [phplib] csv file download... (simple newbie question?) From: Bob Bowker (bowker <email protected>)
Date: 06/19/01

Chris --

The simplest alternating row color is something like the following:

<TR bgcolor="<? echo (++$rowColor % 2) ? "cyan" : "white" ?>">

Setting $rowColor = 0 first is optional, it will work fine either way.

Bob.

At 03:25 PM 6/19/01 +0200, Christopher J. Bobcowski wrote:

>hi.. so this should be pretty simple, but i'm confused just the same.
>i've got my php page to generate a healthy mySql result set, and displaying
>the table. i'd like to add a link/button to download a CSV version of the
>results, but am unsure of the best way to do this. i can display the csv
>version using show_result(), but i'd rather see a "save as" dialog pop up.
>i thought of creating a tmpfile (maybe compressing it as well), and then
>doing something else.
>
>hmm..also, i'd like to alternate row backgrounds from table.inc. i've found
>Fmt_Table by Michael Kuehne, and i don't think that it's a simple solution
>for the alternating row colors wish (although it's a sweet class). i was
>just wondering if anyone's seen that around. i'm guessing this one'd just
>be extending table.inc, overriding the table_row_open & close functions?
>
>cheers for any help!
>-chris
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: phplib-unsubscribe <email protected>
>For additional commands, e-mail: phplib-help <email protected>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>