Hi Guys

I'm trying a script from an OLD book ---- so not sure this apllies today.

I'm looking for help to make this work if possible or to be told the way to do it today. (but I don't want google ads etc on page --- so no sign up to google method)


I want to create a search box that will search within my site. A search my site to help visitors.

The script initially piggybacked altevista ----- I modified to use google

Now it does access google BUT it doesn't return results from my site --- instead this line
Code:
host:www.mydomain.com
appears in the google search box of the pop up window and search results in page return the word host etc

it's not looking within my site as I thought it was supposed to do.

this is what I have:

Code:
<form method=post action="http://www.mydomain.com/cgi-bin/av.cgi" target="blank">
  <div>
	<input type="hidden" name="addon1" value="+host:www.mydomain.com" />
 	<input type="hidden" name="pg" value="q" />
    <input type="submit" name="" value="Search"  />
    <input type="text" name="q" size="50" />
  </div>
</form>


Code:
#!/usr/bin/perl -w

use CGI;
$output = new CGI;
$query = $output->param('q');
$i = 1;
while ($addon = $output->param("addon$i") ) {
$q .= " $addon";
$i++;
}

print "location: http://www.google.com/search?q=q&q=$q\n\n";
any help or advice most appreciated

low tech