PDA

View Full Version : Search Result Page Question


b-online
03-28-2005, 12:37 AM
I am setting up a site search for a online venture.
http://www.bonnyvilleonline.com

I would like to have the search feild under the bookmark link at the top right hand corner of the homepage. When a user hits submit I would like it to a results page rather than adding the results to the current page like it is set at here.
http://www.bonnyvilleonline.com/search/search.php (do a search for "towntalk" to see how results are displayed.)

So basically step by step here is what I would like to happen

1. Homepage loads normal main page content along with search field.
2. When a person hits go it will go to a new page with the results rather than adding them to the main content.

Any advice or suggestions on how I can do this would be much appreciated.

Thanks
Wesley Long
BonnyvilleOnline

bloodjelly
03-28-2005, 09:50 AM
Hi b-online -

To add a search box to the front page, you just have to add a form, like so:
<form method="get" action="search/search.php">
<input type="text" name="query_string" size="12" maxlength="50" /><br />
<input type="submit" name="search" value="Go" />
</form>

So, to make the form point to the search page, and take the user there when he clicks the submit button, just change the "action=" part to point to the search script.

Let me know if you have any questions. :)

b-online
03-28-2005, 12:03 PM
Hello BloodJelly, Thank you very much! That was a very easy fix!!!

Wes