close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

search returns same result each time

Thread began 1/31/2010 4:14 pm by jeffmg279672 | Last modified 2/01/2010 5:31 pm by jeffmg279672 | 865 views | 6 replies

neilo

Hiya Jeff,

I'm a complete novice as far as PHP goes, so nothing is glaringly obvious to me. The easiest thing to have done would have been to use the DataAssist wizard to create your results and detail pages, then place the code in context in your own pages.

But from what I can see, the problem with your link in pre-test.php is that it isn't passing any session data through to the second page (test.php), it is only using the artist variable to link to the page.

You can pass this on (apparently) as a session variable in the URL:

<a href="test.php?artist=<?php echo $row_rsListing['artist']; ?>"><?php echo($row_rsListing['artist']); ?></a>


and to prevent the URL from being mangled (according to php.net and DataAssist pages), encode (rawurlencode) the URL, so:

<a href="test.php?artist=<?php echo(rawurlencode($row_rsListing['artist'])); ?>" ><?php echo($row_rsListing['artist']); ?></a>


would be your whole link in pre-test.php.

From here on I'm just comparing your second page with one of my DataAssist detail pages, and it seems as if your test.php page is all there apart from:

php:
<?php

if (!session_id()) session_start(); 
?>
<?php
$Paramartist_rsAlbums 
"-1";
if (isset(
$_GET['artist'])) {
  
$Paramartist_rsAlbums = (get_magic_quotes_gpc()) ? $_GET['artist'] : addslashes($_GET['artist']);
}
$ParamSessionartist_rsAlbums "-1";
if (isset(
$_SESSION['rs_Insert_listing'])) {
  
$ParamSessionartist_rsAlbums = (get_magic_quotes_gpc()) ? $_SESSION['rs_Insert_listing'] : addslashes($_SESSION['rs_Insert_listing']);
}
$Paramartist2_rsAlbums "-1";
if (isset(
$_GET['artist'])) {
  
$Paramartist2_rsAlbums = (get_magic_quotes_gpc()) ? $_GET['artist'] : addslashes($_GET['artist']);
}


Which - if my tootling round php.net wasn't a totally wasted journey - means that firstly it's checking for a session id and then creating (resuming?) a session, and assigning the parameters for it according to the variable passed from the previous page. That's what I have struggled to make of it, but I may be talking rubbish. Hopefully someone will explain why. I have just transposed your info into it.

So your second page in its entirety would look (I think) pretty much like the page that I've attached. I'm entirely lazy about learning this stuff. I meant to get down to serious learning, but as DataAssist just does it all my motivation disappeared, and there's so much other cooler stuff to play with.

Some of the above might make some sense, and you can try it, but I wouldn't hold my breath. The bright young things will be in soon, and will help out.

Attached Files
test.zip

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...