LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-10-2006, 05:47 AM   #1
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Rep: Reputation: 15
colour selected columns using php sessions?


hi all

i have this code that creates all these columns using checkboxes,

php:
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");

this produces:
[HTML]<td><xsl:value-of select="county_UA"/></td>
<td><xsl:value-of select="pop_code"/></td>[/HTML]

i want be able to have the ability to give the user to colour the columns they require using dropdownlist for the fields and radiobuttons for colours:

html:
[HTML]
<input type="radio" name="radiobutton1" value="chocolate" />chocolate
<input type="radio" name="radiobutton1" value="forestgreen" />forestgreen
<input type="radio" name="radiobutton1" value="turquoise" />turquoise
<br />
<select name="dropdown">
<option value="county_UA">county_UA</option>
<option value="pop_code">pop_code</option>
<option value="favourite_instrument">favourite_instrument</option>
<option value="bbb">bbb</option>
<option value="id">id</option>
<option value="fruit">fruit</option>
<option value="prizes">prizes</option>
<option value="fguk_code">fguk_code</option>
<option value="fgeu_code">fgeu_code</option>
</select>/>favourite_instrument[/HTML]


can that be done?, baring in mind that all thevalues for these checkboxes are in sessions.


here is quick picture of the sort of thing i want to achieve?
http://img293.imageshack.us/img293/7974/sas6vn.jpg

thanks for your time :injured:

Last edited by ati; 05-10-2006 at 07:34 AM.
 
Old 05-10-2006, 08:30 AM   #2
ati
Member
 
Registered: Oct 2005
Location: london
Distribution: fedora 4
Posts: 61

Original Poster
Rep: Reputation: 15
hi

i have got something here but i,m getting errors everywhere may be its just bad syntax or just totaly wrong:

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

if (isset(
$_SESSION['checkbox10'])) {
fwrite($handle,'<td><xsl:value-of select="fgeu_code"/></td>'."\n");
else
if(
$_SESSION['dropdown'] == "fgeu_code") {
fwrite($handle,'<td bgcolor=\"$colour\"><xsl:value-of select="fgeu_code"/></td>'."\n");

thanks
 
  


Reply



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
display field by colour chosen using sessions? ati Programming 5 05-12-2006 02:16 AM
sessions in PHP zowey Programming 2 12-26-2004 06:35 PM
Problem with php sessions sashhoney Linux - Software 7 08-28-2003 07:30 AM
Apache PHP and sessions Satriani Programming 0 04-21-2003 11:55 AM
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 06:45 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