Current location: Hot Scripts Forums » Programming Languages » PHP » retreived data and display data upon choice from first page?


retreived data and display data upon choice from first page?

Reply
  #1 (permalink)  
Old 05-06-06, 05:45 AM
benq benq is offline
Newbie Coder
 
Join Date: May 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy retreived data and display data upon choice from first page?

hi

i,m slightly stuck, i have in the first page radio and check boxes, upon ur choice this will be displayed in the next page using cookies or sessions.

so for example if you pick green check box and submit the page, it will load the second page with your choice. you choose the colour green. here is is more in detail


The information that was retreived from the first page and then saved into cookis needs to be used on page 3 to choose what elements of the XSL style sheet are to be written to the file.

For example on the third page you would run an if statement to see if the display colour green box was ticked, if not then dont write any of the lines relating to green.


so how do i basicaly do that via php.

here is the codes so far:

html
Code:
Code:
<input type="checkbox" name="checkbox2" value="county_UA" />county_UA


php
PHP Code:
PHP Code:

<div id="h">

<p>
Colour 2 Chosen : <?php print($_COOKIE['radiobutton2']);  ?>
</p>
</div>


that displays the choice to the next page and it works fine.

xsl:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlnssl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="first.css"/>
<link rel="stylesheet" type="text/css" href="second.css"/>
</head>
<body id="content">

<h1>Joint Wes_ica Tables</h1>
<table border="5">
<tr><th>county_UA</th><th>pop_code</th><th>favourite_instrument</th>
<th>bbb</th><th>fruit</th><th>prizes</th><th>fguk_code</th><th>fgeu_code</th></tr>

<xsl:for-each select="newdata/data1">
<xsl:sort select="prizes"/>
<tr>
<td><xsl:value-of select="green"/></td>

</tr>
</xsl:for-each>

</table>

</body>
</html>
</xsl:template>
</xsl:stylesheet>
this displays the value from the xml document which under the field or tag green.

so basicaly thats i want to do from the choice in the first page, if i choose to display the green field and yellow field it will do that when i access the xml page or page 3.

if its not clear please by all means let me know i'll try and get into more details.

thanks for your time

Last edited by Christian; 05-07-06 at 12:32 PM. Reason: Added [PHP][/PHP]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Display Data in Columns php-learner PHP 3 02-17-06 03:45 AM
Php Form + mysql + display data sent needed TheRaider Script Requests 3 10-07-04 01:30 AM
page browsing problem mivec PHP 3 04-17-04 03:43 AM
Is it possible to put dynamic data display in a scrolling watermark? Whipsmack JavaScript 1 03-29-04 08:22 AM
cannot display the complete data najmun PHP 2 07-04-03 02:52 PM


All times are GMT -5. The time now is 07:11 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.