LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-09-2006, 05:44 AM   #16
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15

in regard to the code from your last solution:

The first is how you know which column to colour code, I can’t see a method in your script for the column check. The second why are you writing form elements into the XSL file?

You should also be able to use style=”color: chocolate” to change your font colour instead of the outdated font element, i mean i,m just getting into grips with this and how long did it take to learn all this

thanks again
 
Old 05-09-2006, 06:17 AM   #17
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
basicaly this the affect i,m after exaclty that. the user pick field and colour and output exaclty as the picture:

http://img80.imageshack.us/img80/177...led27pn.th.gif
 
Old 05-09-2006, 07:06 AM   #18
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
I was just giving you an idea of how you can structure the php code so you can just modify it if it's not using teh display mechanisms that you want to use.

You said that you want to colour a column. So if this is based on a selected field then you will first want to store the details of the selected field and when you are writign out the details of that column you add the colour details.

if (isset($_SESSION['checkbox11']) Will determine if a checkbox has been selected. So within a loop for each row in your table add this conditional statement and the code that will add the colour.
 
Old 05-09-2006, 07:16 AM   #19
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
hi greamef

thanks for getting back to me,

i have been trying since ur last post i,m not really getting any where

here is my code so far:

PHP Code:
if (isset($_SESSION['radiobutton1']))
{
  if (
$_SESSION['radiobutton1'] == 'chocolate')
     
$colour "#D2691E";
   elseif (
$_SESSION['radiobutton1'] == 'forestgreen')
     
$colour "#228B22";
   elseif (
$_SESSION['radiobutton1'] == 'turquoise')
      
$colour "#00DED1";

}
if (isset(
$_SESSION['checkbox1']))
fwrite($handle,'<td bgcolor="$colour"<xsl:value-of select="county_UA"/></td>'."\n"); 

according to my code is if any those values or colours inthe radiobutton 1 session set the variable with the hex colour value, than if the display check box1 is ticked write this line, this is some how have to be written into the exsiting code but not the current code as i explained earlier if you do two lines you would have two values.

this is got to be a toughest so far

have u looked at the pic, thats exactly the kind thing i want, would it help if i could email u the code or anything like that.

thanks again
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
select statement not work in php with OCIEXEcute() suchi_sood Programming 9 04-12-2006 06:22 AM
sessions in PHP zowey Programming 2 12-26-2004 06:35 PM
Java GUI via command line sessions? Giles Linux - General 2 09-28-2004 09:03 AM
Multiple telnet sessions from the command line Armethous Linux - Newbie 4 02-13-2004 04:07 PM
PHP Sessions RecoilUK Programming 1 04-21-2002 05:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration