On my search form I want to allow my users to use the + and - for doing advanced searches. For example, they should be able to use +lavender -burns to return results that contain lavender but not burns. Through my research on google I've realized that I need to be using urlencode and urldecode to allow a plus to be used in the URL. I'm a bit confused on where I would apply this to a simple form that uses GET. Do I need some sort of javascript that is executed when the Go button is clicked?

$pageContent .= "<form action='search.php' method=GET>";
$pageContent .= "<input name=type type=hidden value='advanced' />";
$pageContent .= "<input name=t type=hidden id='t' value='8' />";
$pageContent .= "<input name=q type=text size=27 maxlength=35 />";
$pageContent .= "<input name=action type=hidden value=processForm>";
$pageContent .= "<input class='button medium green' type=submit value='Go' />";
$pageContent .= "</form>";