RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 899 | Replies: 1
Reply
Join Date: Jul 2006
Posts: 11
Reputation: jeadeb is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
jeadeb jeadeb is offline Offline
Newbie Poster

Searching my web page

  #1  
Jul 27th, 2006
Hi all..

I have built a knowledge base, in html.. would just like to know how I can search for an answer using a search form, that I can have on the home page to find answers on the other html web pages., and just open that web page with the answers on it..

May not be possible. Which is why I came back to the php/mysql section for some PHP script,, if I were to add all my knowledge base answers to a Mysql, database..

So if I added a topics column in database KB, and inserted a whole bunch of random answers, how could I use php to have a simple form,, where I can type a word that may appear in any one of those answers, and all the possible answers can be listed... and when you click on an answer it copies it to clip board so it can be pasted in one swift motion..(I did this in the html version by the way, the click(copy to clipboard thing)..


Any help would be much appreciated, thanks for all your time.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Posts: 19
Reputation: Rotak is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Rotak Rotak is offline Offline
Newbie Poster

Re: Searching my web page

  #2  
Jul 29th, 2006
Originally Posted by jeadeb
Hi all..

I have built a knowledge base, in html.. would just like to know how I can search for an answer using a search form, that I can have on the home page to find answers on the other html web pages., and just open that web page with the answers on it..


Well, if your knowledge base is already completed in HTML, you can use htdig rather than putting everything into a mysql database. (www.htdig.org)

With PHP and a Database, you are able to search for answers by using a query like this:

SELECT * FROM KB WHERE answer LIKE '%SEARCHSTRING%'

If you want to search for more than one word, just repeat the last part and link with AND or OR:

SELECT * FROM KB WHERE answer LIKE '%SEARCHSTRING%' AND answer LIKE '%SEARCHSTRING_2%'
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:47 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC