MyBB Community Forums

Full Version: Search Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I get a search box to work if it is in the header? Like the one here. I'm making a theme and I put my search box in the header.
<form id="main-search" action="search.php">							
<input type="text" tabindex="1" maxlength="255" id="search-field"/>
<label for="search-field" id="search-field-label">Search</label>
<input type="hidden" name="action" value="do_search" />							
<input type="image" alt="Search" value="Search" src="{$mybb->settings['bburl']}/images/digg/header/search.png" id="search-button"/>
	  </form>

Sorry for the double post.

My code looks like this now.
<form id="main-search" action="search.php" method="post">							
<input type="text" tabindex="1" maxlength="255" id="search-field"/>
<label for="search-field" id="search-field-label">Search</label>
<input type="hidden" name="action" value="do_search" />							
<input type="image" alt="Search" value="Search" src="{$mybb->settings['bburl']}/images/digg/header/search.png" id="search-button"/>
	  </form>

I forgot to add method="post" to the code. Now whenever I enter something I want to search it gives me this error.
You did not enter any search terms. At a minimum, you must enter either some search terms or a username to search by.

How would I fix this?