close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

passing var of go to detail page more than once

Thread began 5/30/2010 2:11 pm by mustang_sally_85344510 | Last modified 6/09/2010 10:17 pm by mustang_sally_85344510 | 3291 views | 34 replies |

mustang_sally_85344510

passing var of go to detail page more than once

Hello,
I have a results page that links to a detail page via "go to detail php"...

I need to REUSE that go to detail number on my detail page for a flash menu.php file....

How can I pass that information to my php file?

I have tried $_GET['detailsID'] on my query on the menu.php and it doesn't work.
I have tried using a Flashvar to echo ['detailsID'] into flash.

Any suggestions?

Thank you in advance. :)

Sign in to reply to this post

CraigRBeta Tester

i think I know what you are after.

if you have a variable that you wish to use on more than one page, set it up as a session variable, that should do the trick

Sign in to reply to this post

mustang_sally_85344510

help with session

Thank you for your input.

Would you mind...helping me out with this.

So where would I start this session (what page do I put it on to start..?)

Do I need to reference it on the results, details, and menu.php pages?
menu.php is the only page that isn't getting the detailsID

I don't have much of a clue on the syntex structure of a session. WADA has constructed the sessions I have...(embarrassed to admit...) But when I try to look at the sessions in the applications...there isn't any detail there either...

I know I have to have this:

<?php
if (!isset($_SESSION)) {
session_start();
}
?>


I have attached my menu.php page which has the query with the detailsID=colname...

Any help would be greatly appreciate

Attached Files
menu.zip
Sign in to reply to this post

CraigRBeta Tester

i would start the session on whichever page needs to use the session variable.

(on the page supplied, you have added the lines

<?php
if (!isset($_SESSION)) {
session_start();
}
?>

twice, at the start and again on lines 47, you should do this once, at or near the top of the page)

set a session variable like this...

<?php
$_SESSION["whatever"] = $your_variable;
?>

so you could use your recordset value here, but ensure the recordset has been created before you set the session variable.

when starting, i find it good practice to echo the variable, to ensure it is being set ok.

<?php
echo 'session variable is '.$_SESSION["whatever"];
?>

hope this helps

Sign in to reply to this post

mustang_sally_85344510

session ?

Thank you...

So is this the right way to do the session?

<?php
$_SESSION['detailsID'] = $row_rsQuerryAll['detailsID'];
?>

or should I be using a $_GET['detailsID']

If I try to echo the session...
I get a "headers already sent message 4 times starting at line 59..

Sign in to reply to this post

CraigRBeta Tester

The syntax for setting the session variable looks valid in both cases.

in the first, you are retrieving the value from the recordset, in the second you are retrieving it from the URL variable.

the headers already sent error... difficult for me to investigate.

also, the menu.php you posted has no html markup.

sorry, but i am having difficulty in trying to see what you are attempting.

is it possible you could post a link ?

Sign in to reply to this post

mustang_sally_85344510

menu.php is a xml creator...

my menu.php creates the xml for the flash file. (that is why you are not seeing html markup)

The flash file doesn't need the detailsID...

The menu.php needs it to get the correct information in the query.

Here is the basic detailsID chain of events:

1. search results page with link to details.php page. (using php go to detail behavior)

2. on details.php page is a flash player that needs xml fed to it...via menu.php

3. menu.php needs the detailsID to be able to get the proper information to feed to the player the list generated by the query.

Sign in to reply to this post

CraigRBeta Tester

OK, just so I'm clear...

is the sequence of events, search page ---> menu.php (generate xml)
-->detail.php ?

the search page generates a url variable, you then use this to filter your recordset to create the xml file, then redirect to the detail.php page, again filtered by the same url variable ?

i don't know of a way you can do this automatically, as i am pretty sure you cannot use a php header after your xml output.

(someone out there may know better)

Sign in to reply to this post

mustang_sally_85344510

sequence.

There really isn't a search page.
A page that has a choice of categories to choose from.
When a user clicks on a category it takes them to a results page.

Then, a user can use from that list of results. The results list has links to a detail.php page.
When click on. Takes them to details.php.

details.php has of course detail descriptions and also has a flash player on that page.

The flash xml feed does not get the required information, as menu.php doesn't get the detailsID it needs to generate the xml to feed the player.

This menu.php generates the xml...."on the fly"....
And if you use the page statically, and type in menu.php?detailsID=3 (for example) it generates the proper result needed for the flash player.
So, what I need is to get the detailsID to echo onto menu.php at the same time the user is taken to details.php....

Sign in to reply to this post

CraigRBeta Tester

Hi again.

what i am unclear about is if menu.php, which created the xml on the fly, is called from the results page, or does the results page link directly to detail.php, which just uses the xml generated from menu.php

i have done some testing, and i can pass a URL parameter into a php page to create xml, filtered by the URL parameter, this works fine.

what I am unable to do is then use a php header on the xml creating php page to load the detail page directly from this page.


if you can do this, then the URL parameter should be all you need.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...