Hello,
I'm hoping someone can help resolve my problem, or at least tell me whether it's possible or not so I can elect another option.
GOAL
I want to call a particular function of a PHP script, a queried term, and print it to the <title> and/or <h1> tag of a document on the fly for a given search.
THE SCRIPT
The script in question is the Zoom search engine (PHP install). The script is called and the search results created by virtue of an include <?php include("search.php"); ?> which is inserted into my website's .php template file.
PROBLEM
Unlike most off-the-shelf site search scripts, Zoom doesn't generate page titles at top of the page for a particular query. Further, all requests (so far) to Zoom's support staff have been ignored.
ESTABLISHED
I have been successful inserting the query term using <?php print "$query"; ?> however, it will only work when placed below the point of where the script include is added to the template, seemingly since the script's code is called (and search results generated) between the template's header and footer.
SUMMARY
It may be possible to use <?php print "$query"; ?> to generate the searched term in various other areas on the page, however I don't have the requisite skills to code the template to facilitate the task. I theorize that it may possible to do this using code I'm unfamiliar with -- such as a type of "include() once" placed at top of the template's code.
Could a language construct such as echo(), print(), include(), or require() be added to beginning of the template file to call the $query so as to print to placeholders within the page titles and heading tags?
<?php
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php print("$query"); ?></title>
<h1><?php print("$query"); ?></h1>
HOST SERVER
Apache/1.3.37
PHP/4.3.10
...any help appreciated. Thanks.