Link to home
Start Free TrialLog in
Avatar of fibdev
fibdev

asked on

Site Search

Hello,

I would like to impliment a site search on my web server.
Could somone help me with this.

Thanks
Avatar of nikotto
nikotto

look at this page, there are some ready to use scripts:
http://php.resourceindex.com/Complete_Scripts/Searching/Searching_Your_Web_Site/
other solution : YOU know WHERE in your site (DB ?) you can find relevant data, and YOU build a simple HTML FORM for people to enter keywords, dates and such, and YOU run/display the query and it's results.
If you only want to provide "full-text" search on static pages on all of your site, then use the provided link above or any free search module.
Avatar of fibdev

ASKER

I've looked into the search modules and I think I'm leaning toward a database driven solution.  My site is of moderate size, so it won't take me long to index it.  I am new to php and will need help setting up.  I think for now, I just want to provide keyword searches from a simple textbox and button form.  See http://www.fibdev.com for example.  I've created the form already.  I just need help with the php and how I should set up the table.  Here is the information I would like to display.

Link
Page Title
A few limes of text

Next result...

Next result...

Let's call the table "sitesearch"  Thanks up front for your help.
Avatar of fibdev

ASKER

I still need help with this... Is anyone out there.  I'm new to php and would like a script to queary this table and display these results.
so let me summarize :
1) you have a 100% static website
2) you intend to build a small DB to hold the "keywords" and page references where they appear
3) then you've the FORM that enables the user to enter any combiantion of keywords, or only one (simplier)
4) you need a small PHP source to take the data from the FORM, query the DB accordingly, and return the pages' references in
so let me summarize :
1) you have a 100% static website
2) you intend to build a small DB to hold the "keywords" and page references where they appear
3) then you've the FORM that enables the user to enter any combiantion of keywords, or only one (simplier)
4) you need a small PHP source to take the data from the FORM, query the DB accordingly, and return the pages' references in a list

Am I right ?

Then I need to see your FORM (for fields' names and ACTION= and METHOD=)
Also tell me if you use register_globals=On or Off
And finally what philosophy of search you need so that I can build the DB layout for you

If ever you add a new page or modify somepages, you'll need a mechanism to update the "index/search" DB
Avatar of fibdev

ASKER

I am able to modify the database.  My host provides me with a very useble Database Manager.  The form is simple.

<form method="POST" action="/sitesearch/search.php" style="border-right: 1 solid #647C88; border-bottom: 1 solid #647C88">
            <p style="margin-left: 8">
            <font face="Century Gothic" size="1" color="#647C88">Search for</font>
            <br>
            <input type="text" name="SearchString" size="16">&nbsp;
<input type="submit" value="Go" name="Button1">

register_globals is On.
ASKER CERTIFIED SOLUTION
Avatar of VGR
VGR

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fibdev

ASKER

I think I can work with this.  Thank you.

I will impliment this tommorow and award the points.  I shouldn't need anything else, but we will see.

:)
Avatar of fibdev

ASKER

I never did get this working.  Thank you for trying.
why ? it's crystal clear... what are the errors ?