Searching my web page

Reply

Join Date: Jul 2006
Posts: 11
Reputation: jeadeb is an unknown quantity at this point 
Solved Threads: 0
jeadeb jeadeb is offline Offline
Newbie Poster

Searching my web page

 
0
  #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.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 19
Reputation: Rotak is an unknown quantity at this point 
Solved Threads: 0
Rotak Rotak is offline Offline
Newbie Poster

Re: Searching my web page

 
0
  #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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC