LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-08-2006, 09:43 AM   #1
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Rep: Reputation: 15
creating tr fields according to session values?


hi

here is my code for the question first:

PHP Code:
fwrite($handle,'<tr><th>county_UA</th><th>pop_code</th><th>favourite_instrument</th>       <th>bbb</th><th>id</th><th>fruit</th><th>prizes</th><th>fguk_code</th><th>fgeu_code</th></tr>'."\n"); 
this codes writes the rows for the table which looks like this:

[HTML]
<table id="tab" border="5">
<tr><th>county_UA</th><th>pop_code</th><th>favourite_instrument</th> <th>bbb</th><th>id</th><th>fruit</th><th>prizes</th><th>fguk_code</th>
<th>fgeu_code</th></tr>
[/HTML]

is there way using sessions could do this according to the value of sessions:

so a session value contains county_ua it will write <th>county_UA</th>.

i have done similar but it works fine but not for this:

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

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

                if (isset(
$_SESSION['checkbox4'])) {
                  
fwrite($handle,'<td><xsl:value-of select="favourite_instrument"/></td>'."\n");
                   } 
this basicaly says if the session checkbox4 contains that value print or write this code.

something similar to that would be great.

thanks for the time
 
Old 05-09-2006, 06:23 AM   #2
ruh31
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
Hi!

Code:
is there way using sessions could do this according to the value of sessions:

so a session value contains county_ua it will write <th>county_UA</th>.
If the variable $_SESSION[county] contains that text that you want to replace "county_UA" with, then you couldjust write
PHP Code:
echo "<th>" $_SESSION[county] . "</th>"
Hope that helps ...
 
Old 05-09-2006, 06:31 AM   #3
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by ruh31
Hi!

Code:
is there way using sessions could do this according to the value of sessions:

so a session value contains county_ua it will write <th>county_UA</th>.
If the variable $_SESSION[county] contains that text that you want to replace "county_UA" with, then you couldjust write
PHP Code:
echo "<th>" $_SESSION[county] . "</th>"
Hope that helps ...

thats great thanks

would you also mind looking at this thread please?

where greamef soloution starts about this!

i,m trying to set a colour to the field picked bith by the user via sessions, look at the bottom of the thread and page 2.

there is also pic of the desired effect.

http://www.linuxquestions.org/questi...d.php?t=442728

thanks again
 
Old 05-09-2006, 06:40 AM   #4
ruh31
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
Oh, I am sorry, but this other thread seems too confusing for me right now. I scaned through it but I suppose I will not be able to help you, sorry for that!
 
Old 05-09-2006, 06:43 AM   #5
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
hi

no problem, thanks for looking i think i should start another one as i want to solve this as quick as i can.

thanks again
 
Old 05-09-2006, 06:45 AM   #6
ruh31
Member
 
Registered: Oct 2004
Location: Germany
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
Okay, you can send me an email if you have started that new thread, maybe that one will seem more clear to me ... at least I can have a look at it
 
Old 05-09-2006, 03:45 PM   #7
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
@ ruh31

here is the thread

http://www.linuxquestions.org/questi...d.php?t=442888
 
  


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
Two New LQ Profile Fields jeremy LQ Suggestions & Feedback 8 07-12-2005 11:10 PM
Help me using kernel_stat fields... arunka Programming 0 03-24-2005 06:18 AM
inittab fields env Linux - General 2 03-04-2005 12:36 PM
creating an xfce 4 entry at session login dave37 Red Hat 3 02-09-2005 10:20 AM
xfce4-session fails to save session ! OneManArmy Debian 0 12-10-2004 02:14 PM


All times are GMT -5. The time now is 04:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration