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

rating

Clear search results on page reload?

Thread began 6/09/2010 9:18 am by fabianmacs370894 | Last modified 6/09/2010 12:33 pm by fabianmacs370894 | 1164 views | 6 replies |

fabianmacs370894

Clear search results on page reload?

I have two pages, search and results. Search works fine - problem is when I re-load the results page without any search the old search result records still displays and not ALL the records that I require.

How can I clear the old results when page is reloaded.

I have used Dataassist Search Wizard

Files are attached.

Thanks for any help in advance.

Fabian

Attached Files
search-results.zip
Sign in to reply to this post

Jason ByrnesWebAssist

to clear the search results every time the page is loaded, add the following code at line 1 of your page:

php:
<?php
if(!session_id()) session_start();
if(isset(
$_SESSION["WADbSearch1_resultsallenhanced"])) unset($_SESSION["WADbSearch1_resultsallenhanced"]);
?>
Sign in to reply to this post

fabianmacs370894

PHP Code throwing up blank page

Jason,

Tried that code. Window is now blank. Must be an error on script?

Sign in to reply to this post

Jason ByrnesWebAssist

add :

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>


at line 1 to turn error reporting on

Sign in to reply to this post

fabianmacs370894

No error displaying, just blank page.

Jason,

Still no luck and no error being generated?. Here is the files again. Maybe I have it in wrong part of code?

Thanks,

Fabian

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

Jason ByrnesWebAssist

Ok, I see the problem now, I had a typo originally;

change

php:
if(!session_id()) session_start);



to

php:
if(!session_id()) session_start();
Sign in to reply to this post

fabianmacs370894

Problem solved

Thanks Jason,

Final code that worked:

<?php
if (!session_id()) session_start();
if (isset($_SESSION["WADbSearch1_resultsallenhanced"])) unset($_SESSION["WADbSearch1_resultsallenhanced"]);
?>

Sign in to reply to this post

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