I need to make a search feature for my site. I need to make it search through the mysql data base and return the results to another page. I have figured the code for the data base query(I think) and I know how to make the button and form field but I cant figure out how to make the button execute the search code.
This is the code in using for the button
CODE
<form action="search.php" target="mainFrame" method="post">
Search: <input type="text" name="searchf" />
<input type="submit" />
</form>
And this is what i will be using for the mysql search feature
CODE
$result = mysql_query("SELECT * FROM table WHERE item LIKE '%$variable%'");
while($row = mysql_fetch_array($result))
{
echo $row['title'];
echo "<br />";
}
Im guessing I need to right a method? or something. But im not sure how. Programming is my weakest point

Any help or idea will be gratefully recived. Many thanks.
This post has been edited by Kempy535: 21 Nov, 2006 - 01:48 PM