I am trying to make an input that when submitted it will search google. My script looks like this $input = 'url encoding';
$gsearch = urlencode($input);
print '<a href="http://www.google.com/#hl=en&q='.$gsearch.'">Google Search</a>';
The link will end up being:
[google.com...]
(I am testing it on my computer)
Would I have to us preg_replace to take out the "http://localhost/" or is there some other way to do that?