PDA

View Full Version : make a search box...


Winterworks
01-19-2009, 05:34 PM
<form action="index.php" method="post">
<div class="search">

<input name="searchword" id="mod_search_searchword" maxlength="20" alt="Search" class="inputbox" type="text" size="20" value="search..." onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='search...') this.value='';" /> </div>
<input type="hidden" name="task" value="search" />
<input type="hidden" name="option" value="com_search" />
</form> </div>


I have that code. That shows up as a search bar, but when you type something in it, and press enter, nothing happens, it just refreshes the homepage (probably because of the "form action="index.php"")

Currently you can type something, press enter, and it'll refresh the homepage. How can I make it search my forum, and come up with the vBulletin search results page?

How would I do this?

Dismounted
01-20-2009, 03:16 AM
View the source code of a normal search box in vBulletin, and use that code. However, you must have the security token whenever you use the code, otherwise vBulletin will throw you an error.