How can I add a search form to my menus, main page, etc.? |
![]() ![]() ![]() |
If you want to add a simple search form on your website’s main page, or navigation bar, etc, you can do so by specifying the following HTML on that page. <form method="GET" action="search.php"> <input type="text" name="zoom_query" size="10"> <input type="submit" value="Search"> </form> Note also, the relative location of the search script from where this HTML is placed (eg. if the form is used in a page that is one directory down from the search script, you would need to link to “../search.php”). Alternatively, you can use an absolute path to the search script (so that no matter where you place the above HTML, it will still find the file), for example: <form method="GET" action="http://www.mysite.com/search.php"> ... </form>
If you wish to include more search options (such as match any search words / all search words, etc.) refer to the example in "How do I modify the search form". |