I meant a normal file, no cookie. But that would imply some session handling.
Otherwise a second visitor could get the search results for the first visitor.
Found a simpler solution:
The URL of the second page is build with a query string, so the search parameter can be appended, like:
http://domain.com/page-b.html?param=keywordUsing JavaScript in page-b.html I can parse the querystring and build the iframe source URL.
<script type="text/javascript">
var param=unescape(location.search);
param=param.substring(1,param.length);
iframe_url = "search.php?" + param;
document.write('<iframe src="' + iframe_url + '"></iframe>');
</script>
The script search.php queries the database and displays the results in the iframe.