PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   Search Result Page Question (http://www.phpdig.net/forum/showthread.php?t=1935)

b-online 03-28-2005 12:37 AM

Search Result Page Question
 
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:
Code:

<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

That works perfectly! Thank you!!!
 
Hello BloodJelly, Thank you very much! That was a very easy fix!!!

Wes


All times are GMT -8. The time now is 05:05 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.