On 15 Aug 2008, at 20:34, Jody Cleveland wrote:

On Aug 15, 2008, at 2:27 PM, Stut wrote:

On 15 Aug 2008, at 20:21, Jody Cleveland wrote:

I work for a consortium of 30 libraries. Each library has their own website, but they all share the same web catalog. On each library's website there is a search box to search the catalog, which is on a completely different server from the websites. We've been finding that once people use that search box, they get distracted with the catalog and have no easy way to get back to the library's website. The problem I was tasked with is, coming up with a way to search the catalog with an easy way to return to where the user was before they initiated the search.

The only way I thought to do this was to use a frameset for the search results. Which, you can see here:
http://beta.menashalibrary.org/sites/beta.menashalibrary.org/themes/salamander/searchframe.html

Is POST the only way to get the search results, or will it work with a GET?

If GET will work then you need to set the search form to post to a script on your site which then outputs a frameset with a URL on your server that shows the header, and the URL for the shared search server with all the POSTed variables as GET parameters as the second frame. Job done.

GET should work too. Do you know of any examples anywhere online for this? My brain shuts off at the thought of how I'd do that.

Off the top of my head and very untested...

<?php
  $vars = array();
  foreach ($_POST as $k => $v)
  {
    $vars[] = urlencode($k).'='.urlencode($v);
  }
$searchurl = 'http://search.server.com/search.php?'.implode('&', $vars);
?>
<frameset>
  <frame src="/header.html" />
  <frame src="<?php echo $searchurl; ?>" />
</frameset>

Modify to your own frameset/url requirements but that's the basic idea.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to