if I was you id, search thru a database post the results on the page then the links should go off to another page for what ever that link needs to go.
adding varibles to links is very simple
<a href='test.php?var1=test&var2=test2'>Link</a>
above is a link with varibles in the link, var and var2
var = test
var2 = test2
so lets say you have a page called test.php
in test.php we have this
<? echo "$var<br>$var2"; ?>
this will print
test
test2
now for a search id recomend using a mysql database as the back end and just make a nice sql statement
now make a form and call a tesbox searchtxt
then have the form goto a page or the same page
here is an example on how to split the string and keep searching until all the strings are used
$split_search = explode(" ",$searchtxt);
for($i = 0; $i < count($split_search); $i++)
{
$sql = "SELECT * FROM table WHERE tableform LIKE '%$split_search[$i]%' ORDER BY tableform2 ASC";
finished example
<?
$split_search = explode(" ",$searchtxt);
for($i = 0; $i < count($split_search); $i++)
{
$db_connetion = "localhost";
$db_username = "";
$db_password = "";
$db_databse = "";
$connect = mysql_connect($db_connetion, $db_username, $db_password) or die ("Couldnt connect");
$db = mysql_select_db($db_databse, $connect) or die ("Couldnt open Database");
$sql = "SELECT * FROM table WHERE tableform LIKE '%$split_search[$i]%' ORDER BY tableform2 ASC";
$result = mysql_query($sql, $connect) or die("Could not execute query.<br>");
while ($row = mysql_fetch_array($result)){
$title = $row["fieldname"];
}
echo "$title";
mysql_close($connect);
?>