In test.htm find:
Code:
<form action="http://www.aboutautism.org.uk/phpDig/search.php" target="search.htm" method="post">
<input type="text" name="query_string" value="">
<input type="submit" name="search" value="Go">
</form>
And replace with:
Code:
<script language="JavaScript">
function setCookie(name1, name2, expires, path, domain, secure) {
var querynam = 'query_string';
var queryval = document.forms[name1].elements[name2].value;
document.cookie= querynam + "=" + escape(queryval) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
</script>
<form name="query_form" action="search.htm" method="post" onsubmit="setCookie('query_form','query_string')">
<input type="text" name="query_string" value="">
<input type="submit" name="search" value="Go">
</form>
In search.php find:
Code:
if (ALLOW_RSS_FEED) {
And beforehand add:
Code:
if (strlen($query_string) == 0 && isset($_COOKIE['query_string'])) {
if (strlen($_COOKIE['query_string']) > 0) {
$query_string = $_COOKIE['query_string'];
$_COOKIE['query_string'] = '';
}
}
Keep the IFRAME in search.htm and see if these changes work.
If these changes don't work, the above may need tweaking or you can make a template like those in the templates folder.