Undefined variable: var
that will happen if [font=monospace]$var[/font] is not defined. It is only defined here:
And that line will only run if [font=monospace]isset($_GET['SearchTerm'])[/font] is true, i.e., if the [font=monospace]$GET[/font] array has an element named [font=monospace]'SearchTerm'[/font]. Looking at
[_GET] => Array
We see that it does not.
From some code posted earlier:
// check for a search parameter
if (!isset( $trimmed))
[font=monospace]$trimmed[/font] is always set, because a dozen lines earlier you have
$trimmed = trim($var); //trim whitespace from the stored variable
What's more, in between you check
if ($trimmed == "")
So you're assuming that [font=monospace]$trimmed[/font] is set at this point.
Here's an idea. Try checking that [font=monospace]$_GET['SearchTerm'][/font] exists before you try to use it, and have some idea of what to do if it doesn't without ignoring the fact.